Skip to content

Commit

Permalink
finish refactoring to run on CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
homuler committed Nov 15, 2020
1 parent 53996bb commit e2ad762
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Assets/MediaPipe/SDK/Scripts/External/Protobuf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static List<T> DeserializeProtoVector<T>(IntPtr ptr, pb::MessageParser<T>
var protos = new List<T>(serializedProtoVector.size);

unsafe {
byte* protoPtr = (byte*)serializedProtoVector.data;
byte** protoPtr = (byte**)serializedProtoVector.data;

for (var i = 0; i < serializedProtoVector.size; i++) {
protos.Add(Protobuf.DeserializeProto<T>((IntPtr)(*protoPtr++), parser));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public ImageFrame(ImageFormat.Format format, int width, int height, uint alignme
}

public ImageFrame(ImageFormat.Format format, int width, int height, int widthStep, NativeArray<byte> pixelData) {
Deleter deleter = (IntPtr ptr) => { pixelData.Dispose(); };
Deleter deleter = (IntPtr ptr) => { /** Do nothing (pixelData will be moved) */ };
deleterHandle = GCHandle.Alloc(deleter, GCHandleType.Pinned);

unsafe {
Expand Down

0 comments on commit e2ad762

Please sign in to comment.