~emersion/go-kdf

b172c6598c86de399eddaa76682561eea2bb6e1e — Simon Ser 1 year, 1 month ago 3a28571
vulkan: rename gen{Unpacked,Packed}

Make it clear these generate blocks with the RGBSDA color model.
1 files changed, 4 insertions(+), 4 deletions(-)

M vulkan/vulkan.go
M vulkan/vulkan.go => vulkan/vulkan.go +4 -4
@@ 113,7 113,7 @@ func genSample(ch kdf.Channel, nf numericFormat, bitLength int, bitOffset uint16
	}
}

func genUnpacked(bytesPerChannel int, channels []kdf.Channel, nf numericFormat, endianness kdf.Endianness) *kdf.Block {
func genRGBAUnpacked(bytesPerChannel int, channels []kdf.Channel, nf numericFormat, endianness kdf.Endianness) *kdf.Block {
	var sampleInfo []kdf.SampleInfo
	for _, sample := range internal.UnpackedSamples(channels, bytesPerChannel, endianness) {
		sampleInfo = append(sampleInfo, *genSample(sample.Channel, nf, sample.BitLength, sample.BitOffset))


@@ 153,7 153,7 @@ func genYUVAUnpacked(bytesPerChannel int, channels []kdf.Channel, nf numericForm
	})
}

func genPacked(channels []kdf.Channel, bitsPerChannel []int, nf numericFormat, endianness kdf.Endianness) *kdf.Block {
func genRGBAPacked(channels []kdf.Channel, bitsPerChannel []int, nf numericFormat, endianness kdf.Endianness) *kdf.Block {
	totalBits := 0
	for _, n := range bitsPerChannel {
		totalBits += n


@@ 318,7 318,7 @@ func genTable(endianness kdf.Endianness) map[Format]*kdf.Block {
				continue
			}

			blockTable[format] = genUnpacked(bytesPerChannel, channels, nf, endianness)
			blockTable[format] = genRGBAUnpacked(bytesPerChannel, channels, nf, endianness)
		}
	}



@@ 338,7 338,7 @@ func genTable(endianness kdf.Endianness) map[Format]*kdf.Block {
				continue
			}

			blockTable[format] = genPacked(channels, bitsPerChannel, nf, endianness)
			blockTable[format] = genRGBAPacked(channels, bitsPerChannel, nf, endianness)
		}
	}