diff --git a/大鱼调色/Plugin/DYGrade.metal b/大鱼调色/Plugin/DYGrade.metal index c5f4ffc..290371a 100644 --- a/大鱼调色/Plugin/DYGrade.metal +++ b/大鱼调色/Plugin/DYGrade.metal @@ -105,7 +105,8 @@ inline float dyToolMaskHSLWeight(float3 source,thread const DYMaskParameters& p) if(p.flags&DYMaskLightnessEnabled)weight*=dyToolMaskRangeWeight(hsl.z,p.lightnessRange); return weight; } -inline float dyToolMaskShapeWeight(float x,float y,thread const DYMaskParameters& p,device const DYMaskPath& path){ +inline float dyToolMaskShapeWeight(float x,float y,thread const DYMaskParameters& p,device const DYMaskPath& path, + float4 pathBounds=float4(-INFINITY,-INFINITY,INFINITY,INFINITY)){ float dx=(x-p.centerX)*p.imageAspect,dy=y-p.centerY,ca=cos(p.angle),sa=sin(p.angle); float px=dx*ca+dy*sa,py=-dx*sa+dy*ca; if(p.kind==DYMaskLinearGradient){ @@ -117,7 +118,9 @@ inline float dyToolMaskShapeWeight(float x,float y,thread const DYMaskParameters float shorter=physicalWidth=0&&b>=0?1:0;return dyToolMaskSoftStep(-p.feather*.5f*shorter,0,a256)return 0; - float u=px/physicalWidth,v=py/physicalHeight,sx=physicalWidth/shorter,sy=physicalHeight/shorter,distance2=1e10f;bool inside=false; + float u=px/physicalWidth,v=py/physicalHeight; + if(upathBounds.z||v>pathBounds.w)return 0; + float sx=physicalWidth/shorter,sy=physicalHeight/shorter,distance2=1e10f;bool inside=false; for(int i=0,j=path.count-1;iv)!=(by>v))if(u<(bx-ax)*(v-ay)/(by-ay)+ax)inside=!inside; float ex=(bx-ax)*sx,ey=(by-ay)*sy,xx=(u-ax)*sx,yy=(v-ay)*sy,den=ex*ex+ey*ey,t=den>1e-12f?dyClamp((xx*ex+yy*ey)/den,0,1):0; @@ -426,9 +429,35 @@ kernel void dyCloneStamps(texture2d input [[texture(0)]], // Block-centre sampling is stable in image coordinates and never feeds back. kernel void dyLocalMosaic(texture2d input [[texture(0)]],texture2d output [[texture(1)]],device const DYToolMaskEntry* masks [[buffer(0)]],constant DYToolMaskHeader& h [[buffer(1)]],constant uint& block [[buffer(2)]],uint2 p [[thread_position_in_grid]]) { uint2 size=uint2(output.get_width(),output.get_height());if(any(p>=size))return; - float4 original=input.read(p);float2 uv=(float2(p)+.5f)/float2(size);float3 code=dyToolEncode(original.a>0?original.rgb/original.a:float3(0));float coverage=0; - if(h.section==-102){float x=h.offsetX+uv.x*h.scaleX,y=h.offsetY+uv.y*h.scaleY;for(uint i=0;i=entry.minX&&x<=entry.maxX&&y>=entry.minY&&y<=entry.maxY) + coverage=max(coverage,dyToolMask(x,y,float3(0),entry.mask)); + } + }else{ + bool found=false,encoded=false; + float3 code=0; + for(uint i=0;i=DYMaskHSLKey){ + code=dyToolEncode(original.a>0?original.rgb/original.a:float3(0)); + encoded=true; + } + // Apply levels and inversion even when the path has no geometric coverage. + float amount=parameters.kind==DYMaskBezier + ?dyToolMaskLevels(dyToolMaskShapeWeight(x,y,parameters,entry.mask.path,float4(entry.minX,entry.minY,entry.maxX,entry.maxY)),parameters) + :dyToolMaskOperator(x,y,code,parameters,entry.mask.path); + coverage=found?1-(1-coverage)*(1-amount):amount; + found=true; + } + } if(coverage<=0){output.write(original,p);return;} uint2 q=min((p/block)*block+block/2,size-1);float4 sample=input.read(q); // Preserve the pixel's original alpha and prevent transparent samples turning diff --git a/大鱼调色/Plugin/DYMosaicRender.inc.h b/大鱼调色/Plugin/DYMosaicRender.inc.h index 7408f3c..fe2c264 100644 --- a/大鱼调色/Plugin/DYMosaicRender.inc.h +++ b/大鱼调色/Plugin/DYMosaicRender.inc.h @@ -24,7 +24,16 @@ if(!ok){if(raster)CFRelease(raster);CGImageRelease(cg);return nil;} [boxes sortUsingComparator:^NSComparisonResult(NSArray *a,NSArray *b){NSComparisonResult x=[a[0]compare:b[0]];return x==NSOrderedSame?[a[1]compare:b[1]]:x;}]; std::vector entries; - for(NSArray *box in boxes){DYToolMaskEntry m{};m.section=-102;m.mask.parameters=dyDefaultMaskParameters();auto &p=m.mask.parameters;p.kind=DYMaskRectangle;p.centerX=[box[0]floatValue];p.centerY=[box[1]floatValue];p.width=[box[2]floatValue];p.height=[box[3]floatValue];p.feather=0;entries.push_back(m);} + for(NSArray *box in boxes){ + DYToolMaskEntry m{};m.section=-102;m.mask.parameters=dyDefaultMaskParameters(); + auto &p=m.mask.parameters;p.kind=DYMaskRectangle; + p.centerX=[box[0]floatValue];p.centerY=[box[1]floatValue]; + p.width=[box[2]floatValue];p.height=[box[3]floatValue];p.feather=0; + constexpr float padding=1e-5f; + m.minX=p.centerX-p.width*.5f-padding;m.maxX=p.centerX+p.width*.5f+padding; + m.minY=p.centerY-p.height*.5f-padding;m.maxY=p.centerY+p.height*.5f+padding; + entries.push_back(m); + } [_mosaicEntries release];_mosaicEntries=[[NSData alloc]initWithBytes:entries.data() length:entries.size()*sizeof(DYToolMaskEntry)]; [_mosaicRaster release];_mosaicRaster=raster?[(NSData*)raster copy]:nil; } @@ -46,10 +55,11 @@ if(!face&&!masks.count)return src; NSMutableDictionary *entry=[self device:registry error:error];if(!entry)return nil; NSData *faces=face?[self mosaicFaces:src time:tools[@"renderTime"] error:error]:nil;if(face&&!faces){fail(error,@"当前帧人脸识别失败,请重试或改用跟踪蒙版。");return nil;} + if(face&&!faces.length)return src; DYToolMaskHeader header{};header.section=face?-102:0; iddevice=entry[@"device"];idinput=[src metalTextureForDevice:device]; NSData *skinEntries=_faceEntries;_faceEntries=faces; - idbuffer=[self maskBuffer:face?@{}:@{@"primary":masks} tile:src device:device header:&header];_faceEntries=skinEntries; + idbuffer=[self maskBuffer:face?@{}:@{@"primary":masks} tile:src device:device header:&header mosaic:YES];_faceEntries=skinEntries; MTLTextureDescriptor *desc=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA32Float width:input.width height:input.height mipmapped:NO];desc.storageMode=MTLStorageModePrivate;desc.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite; idoutput=[[device newTextureWithDescriptor:desc]autorelease]; idpipeline=[self computePipeline:@"dyLocalMosaic" entry:entry error:error]; diff --git a/大鱼调色/Plugin/DYToolGPU.h b/大鱼调色/Plugin/DYToolGPU.h index 5c1465f..8ad5878 100644 --- a/大鱼调色/Plugin/DYToolGPU.h +++ b/大鱼调色/Plugin/DYToolGPU.h @@ -3,7 +3,8 @@ struct DYToolMaskEntry { DYResolvedMask mask; int section,combine; - // Image-normalized bounds of a detected face contour (section -100). + // Image coordinates for face contours (-100) and mosaic face boxes (-102). + // Local path coordinates for authored Bézier mosaic masks. float minX,minY,maxX,maxY; }; struct DYToolMaskHeader {unsigned count;float offsetX,offsetY,scaleX,scaleY;int section,premultiplied,faceOnly,skinPreview;}; diff --git a/大鱼调色/Plugin/DYToolGrayCapture.inc.h b/大鱼调色/Plugin/DYToolGrayCapture.inc.h index 1dd02fc..14ab0c9 100644 --- a/大鱼调色/Plugin/DYToolGrayCapture.inc.h +++ b/大鱼调色/Plugin/DYToolGrayCapture.inc.h @@ -4,14 +4,19 @@ - (dy::GrayFrame)toolGrayFrame:(FxImageTile*)tile error:(NSError**)error { auto result=[self toolGrayFrame:tile preview:nil error:error]; // The diagnostic/legacy caller expects normalized floats. Actual analysis - // keeps the GPU-produced bytes through OpenCV, without float expansion. + // keeps the GPU-produced bytes without expanding the full frame to floats. if(result.valid()&&result.pixels.empty()){result.pixels.resize(result.bytes.size());for(size_t i=0;idevice=nil;for(idcandidate in devices)if(candidate.registryID==tile.deviceRegistryID)device=candidate; if(device){idlibrary=[device newLibraryWithURL:[[NSBundle bundleForClass:self.class]URLForResource:@"default" withExtension:@"metallib"]error:error];idgray=[library newFunctionWithName:@"dyToolCapture"],gamma=[library newFunctionWithName:@"dyToolEncodeGamma22"];idgrayPipeline=gray?[device newComputePipelineStateWithFunction:gray error:error]:nil,gammaPipeline=gamma?[device newComputePipelineStateWithFunction:gamma error:error]:nil;idqueue=[device newCommandQueue];MPSImageLanczosScale *scale=[[MPSImageLanczosScale alloc]initWithDevice:device]; @@ -23,20 +28,36 @@ [pipeline release];[function release]; } [scale release];[queue release];[grayPipeline release];[gammaPipeline release];[gray release];[gamma release];[library release]; - }[devices release];if(!entry)return {}; + }[devices release];if(!entry)return NO; } - iddevice=entry[@"device"];idsource=[tile metalTextureForDevice:device];if(!source||source.framebufferOnly||!source.width||!source.height)return {}; - double factor=MIN(1.,MIN(3840./source.width,2160./source.height));NSUInteger width=floor(source.width*factor),height=floor(source.height*factor);if(width<16||height<16||width>3840||height>2160)return {}; + iddevice=entry[@"device"];idsource=[tile metalTextureForDevice:device];if(!source||source.framebufferOnly||!source.width||!source.height)return NO; + double factor=MIN(1.,MIN(3840./source.width,2160./source.height));NSUInteger width=floor(source.width*factor),height=floor(source.height*factor);if(width<16||height<16||width>3840||height>2160)return NO; MTLPixelFormat format=source.pixelFormat==MTLPixelFormatRGBA32Float?MTLPixelFormatRGBA32Float:MTLPixelFormatRGBA16Float; idencoded=entry[@"encoded"],bytes=entry[@"bytes"]; - if(!encoded||encoded.width!=source.width||encoded.height!=source.height||encoded.pixelFormat!=format){MTLTextureDescriptor*d=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:format width:source.width height:source.height mipmapped:NO];d.storageMode=MTLStorageModePrivate;d.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite;encoded=[[device newTextureWithDescriptor:d]autorelease];if(!encoded)return {};entry[@"encoded"]=encoded;} - if(!bytes||bytes.width!=width||bytes.height!=height){MTLTextureDescriptor*d=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA8Unorm width:width height:height mipmapped:NO];d.storageMode=MTLStorageModePrivate;d.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite;bytes=[[device newTextureWithDescriptor:d]autorelease];if(!bytes)return {};entry[@"bytes"]=bytes;} - idbuffer=entry[@"buffer"];if(!buffer||buffer.length!=width*height){buffer=[[device newBufferWithLength:width*height options:MTLResourceStorageModeShared]autorelease];if(!buffer)return {};entry[@"buffer"]=buffer;} + if(!encoded||encoded.width!=source.width||encoded.height!=source.height||encoded.pixelFormat!=format){MTLTextureDescriptor*d=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:format width:source.width height:source.height mipmapped:NO];d.storageMode=MTLStorageModePrivate;d.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite;encoded=[[device newTextureWithDescriptor:d]autorelease];if(!encoded)return NO;entry[@"encoded"]=encoded;} + if(!bytes||bytes.width!=width||bytes.height!=height){MTLTextureDescriptor*d=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA8Unorm width:width height:height mipmapped:NO];d.storageMode=MTLStorageModePrivate;d.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite;bytes=[[device newTextureWithDescriptor:d]autorelease];if(!bytes)return NO;entry[@"bytes"]=bytes;} + idbuffer=nil; + if(gray){ + buffer=entry[@"buffer"]; + if(buffer.length!=width*height){ + buffer=[[device newBufferWithLength:width*height options:MTLResourceStorageModeShared]autorelease]; + if(!buffer)return NO; + entry[@"buffer"]=buffer; + } + } idcommands=[entry[@"queue"]commandBuffer];idencoder=[commands computeCommandEncoder];[encoder setComputePipelineState:entry[@"gamma"]];[encoder setTexture:source atIndex:0];[encoder setTexture:encoded atIndex:1];[encoder dispatchThreads:MTLSizeMake(source.width,source.height,1)threadsPerThreadgroup:MTLSizeMake(16,16,1)];[encoder endEncoding]; [entry[@"scale"]encodeToCommandBuffer:commands sourceTexture:encoded destinationTexture:bytes]; - vector_uint3 info={(unsigned)width,(unsigned)height,(unsigned)(tile.imageOrigin==kFxImageOrigin_BOTTOM_LEFT)};encoder=[commands computeCommandEncoder];[encoder setComputePipelineState:entry[@"gray"]];[encoder setTexture:bytes atIndex:0];[encoder setBuffer:buffer offset:0 atIndex:0];[encoder setBytes:&info length:sizeof(info)atIndex:1];[encoder dispatchThreads:MTLSizeMake(width,height,1)threadsPerThreadgroup:MTLSizeMake(16,16,1)];[encoder endEncoding]; + unsigned flip=tile.imageOrigin==kFxImageOrigin_BOTTOM_LEFT; + if(gray){ + vector_uint3 info={(unsigned)width,(unsigned)height,flip}; + encoder=[commands computeCommandEncoder]; + [encoder setComputePipelineState:entry[@"gray"]];[encoder setTexture:bytes atIndex:0]; + [encoder setBuffer:buffer offset:0 atIndex:0];[encoder setBytes:&info length:sizeof(info) atIndex:1]; + [encoder dispatchThreads:MTLSizeMake(width,height,1) threadsPerThreadgroup:MTLSizeMake(16,16,1)]; + [encoder endEncoding]; + } idpreviewBuffer=nil; - vector_uint3 previewInfo={0,0,info.z}; + vector_uint3 previewInfo={0,0,flip}; if(preview&&entry[@"previewPipeline"]){ double scale=std::min({1.,640./width,360./height}); previewInfo.x=std::max(1u,(unsigned)(width*scale));previewInfo.y=std::max(1u,(unsigned)(height*scale)); @@ -54,14 +75,20 @@ [encoder endEncoding]; } } + if(!gray&&!previewBuffer)return NO; [commands commit];[commands waitUntilCompleted]; - if(commands.status!=MTLCommandBufferStatusCompleted){if(error)*error=commands.error;return {};} + if(commands.status!=MTLCommandBufferStatusCompleted){if(error)*error=commands.error;return NO;} if(previewBuffer){ double pixelAspect=tile.pixelAspect; double aspect=double(width)/height*(std::isfinite(pixelAspect)&&pixelAspect>0?pixelAspect:1); *preview=@{@"rgba":[NSData dataWithBytes:previewBuffer.contents length:previewBuffer.length], @"width":@(previewInfo.x),@"height":@(previewInfo.y),@"aspect":@(aspect)}; } - dy::GrayFrame result;result.width=int(width);result.height=int(height);const auto*begin=static_cast(buffer.contents);result.bytes.assign(begin,begin+width*height);return result; + if(gray){ + gray->width=int(width);gray->height=int(height); + const auto *begin=static_cast(buffer.contents); + gray->bytes.assign(begin,begin+width*height); + } + return YES; } } diff --git a/大鱼调色/Plugin/DYToolHostMethods.inc.h b/大鱼调色/Plugin/DYToolHostMethods.inc.h index fb8eff9..790e077 100644 --- a/大鱼调色/Plugin/DYToolHostMethods.inc.h +++ b/大鱼调色/Plugin/DYToolHostMethods.inc.h @@ -239,14 +239,19 @@ if(_trackingCancelled.load())return [self finishToolAnalysis:@"已取消;保留最后连续可信轨迹" error:error];if(_trackingSingle&&_trackingSamples.count>=2)return [self finishToolAnalysis:nil error:error];if(_trackingSamples.count>=DYToolKeyLimit)return [self finishToolAnalysis:@"轨迹已到数量上限,保留已完成部分" error:error]; CMTime expected=CMTIME_IS_NUMERIC(_trackingPreviousTime)?(_trackingBackward?CMTimeSubtract(_trackingPreviousTime,_trackingFrameDuration):CMTimeAdd(_trackingPreviousTime,_trackingFrameDuration)):_trackingReferenceTime;if(!CMTIME_IS_NUMERIC(time)||time.epoch!=expected.epoch||CMTimeCompare(time,expected)!=0)return [self stopToolAnalysis:@"宿主帧序列不连续,停在最后可信帧" error:error]; NSDictionary *preview=nil; - dy::GrayFrame frame=[self toolGrayFrame:tile preview:(_trackingSingle&&!_trackingObjectMode)?nullptr:&preview error:error]; - if(!frame.valid())return [self stopToolAnalysis:@"宿主未返回完整源画面" error:error]; + dy::GrayFrame frame; + const bool stamp=_trackingStampMotion.active; + const bool objectMode=_trackingObjectMode&&!stamp; + // The object tracker consumes only the small color image. The gray frame + // is useful at the seed only when checking orientation against a cached frame. + const bool needsGray=!objectMode||(!_trackingSamples.count&&_trackingReferenceFrame.valid()); + if(![self captureTrackingTile:tile gray:needsGray?&frame:nullptr preview:(!_trackingSingle||objectMode)?&preview:nullptr error:error]) + return [self stopToolAnalysis:@"宿主未返回完整源画面" error:error]; if(!_trackingSamples.count){if(_trackingReferenceFrame.valid()&&frame.width==_trackingReferenceFrame.width&&frame.height==_trackingReferenceFrame.height){double same=0,flip=0;size_t count=0;for(int y=0;y640||height>640||rgba.length!=size_t(width)*height*4)return [self finishToolAnalysis:@"目标跟踪未取得完整分析画面,原轨迹已保留" error:error]; if(!_trackingSamples.count){ diff --git a/大鱼调色/Plugin/DYToolRender.inc.h b/大鱼调色/Plugin/DYToolRender.inc.h index 1067ad2..3a7e8ab 100644 --- a/大鱼调色/Plugin/DYToolRender.inc.h +++ b/大鱼调色/Plugin/DYToolRender.inc.h @@ -1,12 +1,26 @@ // Included in DYRenderer; all calls execute under its per-instance recursive lock. - (id)maskBuffer:(NSDictionary*)groups tile:(FxImageTile*)tile device:(id)device header:(DYToolMaskHeader*)h { + return [self maskBuffer:groups tile:tile device:device header:h mosaic:NO]; +} +- (id)maskBuffer:(NSDictionary*)groups tile:(FxImageTile*)tile device:(id)device header:(DYToolMaskHeader*)h mosaic:(BOOL)mosaic { std::vector entries;FxRect image=tile.imagePixelBounds,bounds=tile.tilePixelBounds; float w=image.right-image.left,ht=image.top-image.bottom;BOOL bottom=tile.imageOrigin==kFxImageOrigin_BOTTOM_LEFT; h->offsetX=(bounds.left-image.left)/w;h->scaleX=(bounds.right-bounds.left)/w; h->offsetY=bottom?(image.top-bounds.bottom)/ht:(image.top-bounds.top)/ht;h->scaleY=(bottom?-1:1)*(bounds.top-bounds.bottom)/ht; h->premultiplied=1; for(NSString *type in groups){NSInteger section=[DYToolTypes()indexOfObject:type];if(section==NSNotFound)continue; - for(NSDictionary *m in groups[type]){if(![m[@"enabled"]boolValue])continue;DYToolMaskEntry entry{};entry.section=(int)section;entry.combine=[m[@"combine"]intValue];[m[@"parameters"]getBytes:&entry.mask.parameters length:sizeof(DYMaskParameters)];entry.mask.parameters.imageAspect=w/ht;NSData *nodes=m[@"nodes"];entry.mask.path=dyFlattenMask((const DYBezierNode*)nodes.bytes,nodes.length/sizeof(DYBezierNode));entries.push_back(entry);} + for(NSDictionary *m in groups[type]){ + if(![m[@"enabled"]boolValue])continue; + DYToolMaskEntry entry{};entry.section=(int)section;entry.combine=[m[@"combine"]intValue]; + [m[@"parameters"]getBytes:&entry.mask.parameters length:sizeof(DYMaskParameters)];entry.mask.parameters.imageAspect=w/ht; + NSData *nodes=m[@"nodes"];auto &path=entry.mask.path; + path=dyFlattenMask((const DYBezierNode*)nodes.bytes,nodes.length/sizeof(DYBezierNode)); + if(mosaic&&entry.mask.parameters.kind==DYMaskBezier&&path.count>=3){ + auto x=std::minmax_element(path.x,path.x+path.count),y=std::minmax_element(path.y,path.y+path.count); + entry.minX=*x.first;entry.maxX=*x.second;entry.minY=*y.first;entry.maxY=*y.second; + } + entries.push_back(entry); + } }if(_faceEntries.length){const DYToolMaskEntry *faces=(const DYToolMaskEntry*)_faceEntries.bytes;entries.insert(entries.end(),faces,faces+_faceEntries.length/sizeof(DYToolMaskEntry));}h->count=(unsigned)entries.size();if(entries.empty())entries.push_back({});return [[device newBufferWithBytes:entries.data() length:entries.size()*sizeof(DYToolMaskEntry) options:MTLResourceStorageModeShared]autorelease]; } - (BOOL)encodeBlend:(id)before after:(id)after output:(id)output masks:(id)masks header:(DYToolMaskHeader)h entry:(NSMutableDictionary*)entry commands:(id)commands error:(NSError**)error { diff --git a/大鱼调色/Plugin/DYToolTrackingDiagnostics.inc.h b/大鱼调色/Plugin/DYToolTrackingDiagnostics.inc.h index a732132..43ff6c4 100644 --- a/大鱼调色/Plugin/DYToolTrackingDiagnostics.inc.h +++ b/大鱼调色/Plugin/DYToolTrackingDiagnostics.inc.h @@ -66,6 +66,12 @@ auto compact=[plugin toolGrayFrame:fine preview:nullptr error:nil];BOOL identical=compact.valid()&&compact.pixels.empty()&&compact.bytes.size()==w*h; for(size_t i=0;i previewOnly=[(id)[[NSClassFromString(@"DYPlugIn") alloc] initWithAPIManager:host] autorelease]; + NSDictionary *color=nil,*referenceColor=nil; + BOOL colorOK=[previewOnly captureTrackingTile:fine gray:nullptr preview:&color error:nil]; + auto full=[plugin toolGrayFrame:fine preview:&referenceColor error:nil]; + BOOL noGrayBuffer=YES;for(NSDictionary *entry in [[previewOnly valueForKey:@"toolCaptureDevices"] allValues])noGrayBuffer&=entry[@"buffer"]==nil; + run.record(@"mosaic-tracking-4k-color-input-matches-without-gray-buffer",colorOK&&full.valid()&&color[@"rgba"]&&[color isEqual:referenceColor]&&noGrayBuffer); } // UI aliases of a shared object are one tracking target. Switching from the // global editor to either linked module must not cancel a valid analysis. diff --git a/大鱼调色/Plugin/DYToolTrackingProbe.inc.h b/大鱼调色/Plugin/DYToolTrackingProbe.inc.h index 0f7a44e..9d05056 100644 --- a/大鱼调色/Plugin/DYToolTrackingProbe.inc.h +++ b/大鱼调色/Plugin/DYToolTrackingProbe.inc.h @@ -29,6 +29,7 @@ - (BOOL)cleanupAnalysis:(NSError**)error; - (dy::GrayFrame)toolGrayFrame:(FxImageTile*)tile error:(NSError**)error; - (dy::GrayFrame)toolGrayFrame:(FxImageTile*)tile preview:(NSDictionary**)preview error:(NSError**)error; +- (BOOL)captureTrackingTile:(FxImageTile*)tile gray:(dy::GrayFrame*)gray preview:(NSDictionary**)preview error:(NSError**)error; @end @interface DYToolCanvasProbe : DYToolTrackingProbe diff --git a/大鱼调色/Plugin/Info.plist b/大鱼调色/Plugin/Info.plist index f7e4c9c..8935b00 100644 --- a/大鱼调色/Plugin/Info.plist +++ b/大鱼调色/Plugin/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 1.21.1 + 1.21.2 CFBundleVersion - 117 + 118 NSHumanReadableCopyright PlugInKit diff --git a/大鱼调色/Wrapper Application/Info.plist b/大鱼调色/Wrapper Application/Info.plist index aaf24a3..cdf6ab8 100644 --- a/大鱼调色/Wrapper Application/Info.plist +++ b/大鱼调色/Wrapper Application/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.21.1 + 1.21.2 CFBundleVersion - 117 + 118 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright diff --git a/开发交接.md b/开发交接.md index 9912236..07dbfac 100644 --- a/开发交接.md +++ b/开发交接.md @@ -2,6 +2,12 @@ 更新于 2026-11-08(Asia/Shanghai)。这是新对话的接手入口。历史设计和实现细节按需查阅专项交接,复现和交付证据以对应版本的报告为准。 +## 1.21.2(118)局部马赛克与蒙版分析性能 + +2026-11-08。已核对正式 1.21.1(117)与大鱼远端基线。马赛克渲染只在色键使用颜色编码,钢笔路径在局部包围范围外跳过轮廓计算,反相与色阶仍照常应用。无人脸命中时跳过全帧马赛克通道。指定目标追踪沿用原 Vision 彩色输入,仅在有可对照的起始画面时需要整帧灰度;普通蒙版与图章保留灰度输入。 + +本机 M4 的 Vision 计算设备查询显示,人脸框和目标追踪支持神经网络引擎、GPU 和 CPU,普通蒙版使用的透视配准只列 CPU。先比较相同像素输入和轨迹,再从正式路径验证 FCP。当前为源码检查点,正式安装、验收和发行待更新。 + ## 1.21.1(117)首次示波器与人脸肤色保护 正式安装在 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,编译提交 `98d80970e83e30e4883a76d8f740f2fca5d05e7c`,APP 公证 `eeda9002-5e87-4a33-83d3-9163a14283ba` Accepted。票据、Gatekeeper、PluginKit 唯一路径及 1008 项正式安装原生检查通过。FCP 12.4 已从正式路径启动插件服务。17 套模板检查通过。[安装](verification/Delivery1.21.1.json)