mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 00:47:28 +01:00
Add a base.pixel_swizzler type
This commit is contained in:
1 parent
86b8408223
commit
6c9dca47ee
11 files changed
+317
-35
No files matched your search
@@ -71,6 +71,7 @@ var Types = []string{
|
||||
"image_config",
|
||||
"pixel_buffer",
|
||||
"pixel_config",
|
||||
"pixel_swizzler",
|
||||
|
||||
"decode_frame_options",
|
||||
}
|
||||
@@ -303,7 +304,13 @@ var Funcs = []string{
|
||||
// ---- pixel_buffer
|
||||
|
||||
"pixel_buffer.palette() slice u8",
|
||||
"pixel_buffer.pixel_format() u32",
|
||||
"pixel_buffer.plane(p u32[..3]) table u8",
|
||||
|
||||
// ---- pixel_swizzler
|
||||
|
||||
"pixel_swizzler.initialize!(dst_pixfmt u32, src_pixfmt u32)",
|
||||
"pixel_swizzler.swizzle_packed!(dst slice u8, src slice u8) u64",
|
||||
}
|
||||
|
||||
// The "T1" and "T2" types here are placeholders for generic "slice T" or
|
||||
|
||||
+10
-8
@@ -61,10 +61,11 @@ var (
|
||||
typeExprIOWriter = a.NewTypeExpr(0, t.IDBase, t.IDIOWriter, nil, nil, nil)
|
||||
typeExprStatus = a.NewTypeExpr(0, t.IDBase, t.IDStatus, nil, nil, nil)
|
||||
|
||||
typeExprFrameConfig = a.NewTypeExpr(0, t.IDBase, t.IDFrameConfig, nil, nil, nil)
|
||||
typeExprImageConfig = a.NewTypeExpr(0, t.IDBase, t.IDImageConfig, nil, nil, nil)
|
||||
typeExprPixelBuffer = a.NewTypeExpr(0, t.IDBase, t.IDPixelBuffer, nil, nil, nil)
|
||||
typeExprPixelConfig = a.NewTypeExpr(0, t.IDBase, t.IDPixelConfig, nil, nil, nil)
|
||||
typeExprFrameConfig = a.NewTypeExpr(0, t.IDBase, t.IDFrameConfig, nil, nil, nil)
|
||||
typeExprImageConfig = a.NewTypeExpr(0, t.IDBase, t.IDImageConfig, nil, nil, nil)
|
||||
typeExprPixelBuffer = a.NewTypeExpr(0, t.IDBase, t.IDPixelBuffer, nil, nil, nil)
|
||||
typeExprPixelConfig = a.NewTypeExpr(0, t.IDBase, t.IDPixelConfig, nil, nil, nil)
|
||||
typeExprPixelSwizzler = a.NewTypeExpr(0, t.IDBase, t.IDPixelSwizzler, nil, nil, nil)
|
||||
|
||||
typeExprDecodeFrameOptions = a.NewTypeExpr(0, t.IDBase, t.IDDecodeFrameOptions, nil, nil, nil)
|
||||
|
||||
@@ -101,10 +102,11 @@ var builtInTypeMap = typeMap{
|
||||
t.IDIOWriter: typeExprIOWriter,
|
||||
t.IDStatus: typeExprStatus,
|
||||
|
||||
t.IDFrameConfig: typeExprFrameConfig,
|
||||
t.IDImageConfig: typeExprImageConfig,
|
||||
t.IDPixelBuffer: typeExprPixelBuffer,
|
||||
t.IDPixelConfig: typeExprPixelConfig,
|
||||
t.IDFrameConfig: typeExprFrameConfig,
|
||||
t.IDImageConfig: typeExprImageConfig,
|
||||
t.IDPixelBuffer: typeExprPixelBuffer,
|
||||
t.IDPixelConfig: typeExprPixelConfig,
|
||||
t.IDPixelSwizzler: typeExprPixelSwizzler,
|
||||
|
||||
t.IDDecodeFrameOptions: typeExprDecodeFrameOptions,
|
||||
}
|
||||
|
||||
+10
-8
@@ -440,10 +440,11 @@ const (
|
||||
IDBase = ID(0x131)
|
||||
IDThis = ID(0x132)
|
||||
|
||||
IDFrameConfig = ID(0x160)
|
||||
IDImageConfig = ID(0x161)
|
||||
IDPixelBuffer = ID(0x162)
|
||||
IDPixelConfig = ID(0x163)
|
||||
IDFrameConfig = ID(0x160)
|
||||
IDImageConfig = ID(0x161)
|
||||
IDPixelBuffer = ID(0x162)
|
||||
IDPixelConfig = ID(0x163)
|
||||
IDPixelSwizzler = ID(0x164)
|
||||
|
||||
IDDecodeFrameOptions = ID(0x168)
|
||||
|
||||
@@ -763,10 +764,11 @@ var builtInsByID = [nBuiltInIDs]string{
|
||||
IDBase: "base",
|
||||
IDThis: "this",
|
||||
|
||||
IDFrameConfig: "frame_config",
|
||||
IDImageConfig: "image_config",
|
||||
IDPixelBuffer: "pixel_buffer",
|
||||
IDPixelConfig: "pixel_config",
|
||||
IDFrameConfig: "frame_config",
|
||||
IDImageConfig: "image_config",
|
||||
IDPixelBuffer: "pixel_buffer",
|
||||
IDPixelConfig: "pixel_config",
|
||||
IDPixelSwizzler: "pixel_swizzler",
|
||||
|
||||
IDDecodeFrameOptions: "decode_frame_options",
|
||||
|
||||
|
||||
Reference in new issue
Block a user