From ca7221f073e0e9ff3b2d7ee06c10e12ae6cf0383 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 16 Nov 2026 15:17:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5HSL=E7=82=B9=E5=8F=96?= =?UTF-8?q?=E8=89=B2=E5=88=87=E6=8D=A2=E4=B8=8E=E8=82=A4=E8=89=B2=E6=A9=99?= =?UTF-8?q?=E8=89=B2=E4=BC=98=E5=85=88=EF=BC=8C=E4=BF=AE=E6=AD=A3DLog?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=9B=B2=E7=BA=BF=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Publishing/1.22.3/Release.md | 12 +++++++++ README.md | 6 +++++ template/sources/RegisteredParameters.json | 2 +- 大鱼调色/Plugin/DYColorManagement.h | 2 ++ 大鱼调色/Plugin/DYDiagnostics.mm | 2 ++ 大鱼调色/Plugin/DYHSLPicker.h | 22 +++++++++++++++ 大鱼调色/Plugin/DYHSLPickerDiagnostics.inc.h | 28 ++++++++++++++++++++ 大鱼调色/Plugin/DYInspector.mm | 25 ++++++++++++++++- 开发交接.md | 6 +++-- 9 files changed, 101 insertions(+), 4 deletions(-) create mode 100644 Publishing/1.22.3/Release.md create mode 100644 大鱼调色/Plugin/DYHSLPicker.h create mode 100644 大鱼调色/Plugin/DYHSLPickerDiagnostics.inc.h diff --git a/Publishing/1.22.3/Release.md b/Publishing/1.22.3/Release.md new file mode 100644 index 0000000..38acf6d --- /dev/null +++ b/Publishing/1.22.3/Release.md @@ -0,0 +1,12 @@ +大鱼调色 1.22.3(138)新增 HSL 吸管:点击画面取色后,自动切换到颜色对应的 HSL 调整项,暖肤色优先进入橙色。中性色与 Esc 取消保留当前项,取色只选择颜色,不改动调色数值。主模块、独立 HSL 层及控制面板共用。 + +在一级调色与独立 CST 的曲线菜单中新增: + +- DJI Mavic 4 Pro / 御 4 Pro(D-Log) +- DJI Pocket 4(D-Log) +- DJI Pocket 4P(D-Log) +- DJI Pocket 4P(D-Log 2) + +D-Log 搭配 DJI D-Gamut,D-Log 2 搭配 DJI D-Gamut 2;曲线与色域仍独立选择。新增机型名称复用既有标准 Log 编码与解码,输入、工作和输出位置均可选,保留既有参数编号和工程默认行为。御 4 Pro 的 D-Log M 素材须使用对应的 D-Log M 处理,不能选 D-Log。 + +适用于 Apple Silicon Mac,macOS 14.6 或更高版本。唯一正式安装路径 `/Library/Plug-Ins/FxPlug/大鱼调色.app`。本版本不修改站点文章或主 APP 更新通道。 diff --git a/README.md b/README.md index 7af7243..b119679 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # 大鱼调色 +## 1.22.3 DJI 相机曲线与 HSL 吸管 + +HSL 新增“吸管”:点取画面颜色后自动进入对应八色调整项,暖肤色优先进入橙色;中性色/取消保留当前选择,调色值不变。主模块、独立层与控制面板均可用。 + +一级调色与独立 CST 的输入/工作/输出曲线菜单新增御 4 Pro D-Log、Pocket 4 D-Log、Pocket 4P D-Log 和 D-Log 2。D-Log 手选搭配 DJI D-Gamut,D-Log 2 搭配 DJI D-Gamut 2;仍保持曲线与色域独立。御4Pro的D-Log M素材使用相应D-Log M处理。[模式依据及ID映射](research/DJICameraCurves.md)。 + ## 独立效果与水平校正 在 Final Cut Pro 的「效果 → 大鱼调色」可选「大鱼调色」「一级调色」或「HSL」。独立效果打开对应模块,保留画面工具栏和控制面板,可继续添加其他调色模块。 diff --git a/template/sources/RegisteredParameters.json b/template/sources/RegisteredParameters.json index 57ad81f..2c8e7d8 100644 --- a/template/sources/RegisteredParameters.json +++ b/template/sources/RegisteredParameters.json @@ -3737,7 +3737,7 @@ "sourceSHA256": { "template/tools/dump_model.mm": "ae9c5d23b7d44f92b0358be3fc8a1e383a85f7945c6150c42e818526f185661c", "大鱼调色/Plugin/DYCSTTypes.h": "ed5ba7e7ae35d1bba10e80a81184fa26b1f7eb582e47b2e45c3edd294889c76a", - "大鱼调色/Plugin/DYColorManagement.h": "b0a4cd1b8c45dbce90a7b4f30f72ebf95ecd382895e74e3bfeda0f7cdb185157", + "大鱼调色/Plugin/DYColorManagement.h": "22b30f18bfa609f17d12709434bb376f481154f66d3242fc52b8cec355428fad", "大鱼调色/Plugin/DYFilmMath.h": "945b7036c6aa6d27941a3bf96c4d70dec65a14b1747fba618e650738fa7108f0", "大鱼调色/Plugin/DYFilmTypes.h": "c35a43b5b93988e8517e5db8f281da0dfd1e02f5b0e7bfb62e7345cec444a36d", "大鱼调色/Plugin/DYManagedColor.h": "36ae3c92cb0ce6ada6535e096154daeee221c6d73a8a8ee6117dc285939b22a8", diff --git a/大鱼调色/Plugin/DYColorManagement.h b/大鱼调色/Plugin/DYColorManagement.h index 380a662..33d8367 100644 --- a/大鱼调色/Plugin/DYColorManagement.h +++ b/大鱼调色/Plugin/DYColorManagement.h @@ -41,6 +41,8 @@ typedef struct DYCMSettings { #ifndef __METAL_VERSION__ #include static inline int DYBasisMode(int c) { + // Named D-Log camera entries share the native D-Log primary math. + if(c>=31&&c<=33)c=11; if(c==99)return 0;if(c>=1&&c<=11)return c; switch(c){case 14:return 12;case 15:return 13;case 16:return 14;case 19:return 15;case 20:return 16;case 21:return 17;case 22:return 18;case 25:return 19;case 27:return 20;case 28:return 21;default:return -1;} } diff --git a/大鱼调色/Plugin/DYDiagnostics.mm b/大鱼调色/Plugin/DYDiagnostics.mm index 2e582dc..a431e61 100644 --- a/大鱼调色/Plugin/DYDiagnostics.mm +++ b/大鱼调色/Plugin/DYDiagnostics.mm @@ -15,6 +15,7 @@ #import "DYLUTLibrary.h" #import "DYLUTBrowser.h" #import "DYInspector.h" +#include "DYHSLPicker.h" #import "DYTheme.h" #include "DYSpiderState.h" #include "DYToolGPU.h" @@ -641,6 +642,7 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool { #include "DYPrimaryDiagnostics.inc.h" #include "DYUnifiedDiagnostics.inc.h" #include "DYCompactUIDiagnostics.inc.h" + #include "DYHSLPickerDiagnostics.inc.h" #include "DYViewerParameterDiagnostics.inc.h" #include "DYViewerControlsDiagnostics.inc.h" #include "DYCanvasToolsDiagnostics.inc.h" diff --git a/大鱼调色/Plugin/DYHSLPicker.h b/大鱼调色/Plugin/DYHSLPicker.h new file mode 100644 index 0000000..076340f --- /dev/null +++ b/大鱼调色/Plugin/DYHSLPicker.h @@ -0,0 +1,22 @@ +#pragma once +#include +#include + +// Display sRGB point -> the existing eight HSL lanes. No grading values change. +// Near-neutrals have no useful hue and keep the current selection (-1). +static inline int DYHSLPickedLane(float r,float g,float b) { + if(!std::isfinite(r)||!std::isfinite(g)||!std::isfinite(b))return -1; + r=std::clamp(r,0.f,1.f);g=std::clamp(g,0.f,1.f);b=std::clamp(b,0.f,1.f); + float high=std::max({r,g,b}),low=std::min({r,g,b}),chroma=high-low; + if(high<.025f||chroma<.015f||chroma/high<.06f)return -1; + float hue=high==r?(g-b)/chroma:high==g?(b-r)/chroma+2:(r-g)/chroma+4; + hue*=60;if(hue<0)hue+=360; + float saturation=chroma/high; + // Warm, less saturated pink/peach/brown points take precedence over red/yellow. + // This is a colour heuristic, not face/person detection; saturated red stays red. + if(hue<=52&&r>g&&g>=b-.025f&&saturation>=.08f&&saturation<=.72f)return 1; + const float centers[]={0,30,60,120,180,240,270,315}; + int best=0;float closest=360; + for(int lane=0;lane<8;lane++){float distance=std::fabs(hue-centers[lane]);distance=std::min(distance,360-distance);if(distance_values copy]autorelease];NSData *pickTools=[NSKeyedArchiver archivedDataWithRootObject:DYReadTools(pickHost,kCMTimeZero) requiringSecureCoding:YES error:nil]; + for(NSUInteger editorIndex=0;editorIndex_values]&&[pickTools isEqual:pickAfter]&&pickHost->_undoStarts==0); +} diff --git a/大鱼调色/Plugin/DYInspector.mm b/大鱼调色/Plugin/DYInspector.mm index 5952342..3b5b436 100644 --- a/大鱼调色/Plugin/DYInspector.mm +++ b/大鱼调色/Plugin/DYInspector.mm @@ -2,6 +2,7 @@ #import "DYManagedColorPanel.h" #import "DYManagedColor.h" #import "DYInspector.h" +#include "DYHSLPicker.h" #import "../Shared/DYBetaDiagnostics.h" #import "DYModel.h" #import "DYToolState.h" @@ -747,6 +748,9 @@ NSView *DYCreateWorkspaceMaskEditor(id [card addSubview:actions];[body addObject:actions]; } if([key isEqual:@"hsl"]) { + DYFlippedView *pickActions=[[[DYFlippedView alloc]initWithFrame:NSZeroRect]autorelease];pickActions.identifier=@"hslPickerControls"; + NSButton *autoPicker=DYButton(@"HSL 吸管",self,@selector(sampleHSLLane:));autoPicker.identifier=@"hslLanePicker";autoPicker.image=[NSImage imageWithSystemSymbolName:@"eyedropper" accessibilityDescription:nil];autoPicker.toolTip=@"点击画面取色,自动切换到对应颜色;肤色优先进入橙色。Esc 取消。";autoPicker.accessibilityLabel=@"HSL 吸管"; + [pickActions addSubview:autoPicker];[card addSubview:pickActions];[body addObject:pickActions]; DYFlippedView *tabs=[[[DYFlippedView alloc]initWithFrame:NSZeroRect]autorelease];tabs.identifier=@"hslTabs"; for(NSInteger i=0;i<9;i++){DYSwatchButton *b=[[[DYSwatchButton alloc]initWithFrame:NSZeroRect]autorelease];[b setButtonType:NSButtonTypePushOnPushOff];b.swatch=i<8?[NSColor colorWithSRGBRed:((double[]){1,1,1,.15,0,0,.75,1})[i] green:((double[]){.2,.55,.84,.76,.76,.47,.15,.15})[i] blue:((double[]){.25,.12,0,.25,.8,1,.9,.65})[i] alpha:1]:DYAccent();b.title=@"";if(i==8)b.identifier=@"customColorSwatch";b.tag=i;b.target=self;b.action=@selector(tabChanged:);b.state=i==0?NSControlStateValueOn:NSControlStateValueOff;b.accessibilityLabel=[@[@"红",@"橙",@"黄",@"绿",@"青",@"蓝",@"紫",@"洋红",@"自定义"][i] stringByAppendingString:@" HSL"];[tabs addSubview:b];} [card addSubview:tabs];[body addObject:tabs]; @@ -907,7 +911,7 @@ NSView *DYCreateWorkspaceMaskEditor(id CGFloat rh=[self heightForRow:row];row.frame=NSMakeRect(12,rowY,cw-24,rh-1);rowY+=rh; if([row.identifier isEqual:@"primaryBalance"])for(NSView *v in row.subviews)v.frame=row.bounds; if([row.identifier hasPrefix:@"heading:"])for(NSView *v in row.subviews)v.frame=NSMakeRect(3,7,row.bounds.size.width-6,18); - if([row.identifier isEqual:@"autoControls"]||[row.identifier isEqual:@"sampleControls"]) { + if([row.identifier isEqual:@"autoControls"]||[row.identifier isEqual:@"sampleControls"]||[row.identifier isEqual:@"hslPickerControls"]) { CGFloat buttonWidth=(row.bounds.size.width-4*(row.subviews.count-1))/MAX((NSUInteger)1,row.subviews.count);NSInteger i=0; for(NSView *button in row.subviews)[button setFrame:NSMakeRect((buttonWidth+4)*i++,3,buttonWidth,25)]; } @@ -1528,6 +1532,25 @@ NSView *DYCreateWorkspaceMaskEditor(id - (void)autoWhiteBalance:(id)sender { if(_embedded){[self writeGraphicValues:DYAutoWhiteBalance([_renderer preview])];return;}[[NSNotificationCenter defaultCenter]postNotificationName:@"DYAutoWhiteBalance" object:_manager]; } - (void)sampleWhiteBalance:(id)sender { [self sampleColorForWhiteBalance:YES]; } - (void)sampleCustomColor:(id)sender { [self sampleColorForWhiteBalance:NO]; } +- (void)selectHSLColor:(NSColor *)sample { + NSColor *color=[sample colorUsingColorSpace:NSColorSpace.sRGBColorSpace];if(!color)return; + NSInteger lane=DYHSLPickedLane(color.redComponent,color.greenComponent,color.blueComponent); + if(lane>=0)_tabs[@"hsl"]=@(lane); + for(NSDictionary *card in _cards)if([card[@"section"][@"key"]isEqual:@"hsl"]){ + for(NSView *row in card[@"body"]){ + if([row.identifier isEqual:@"hslTabs"])for(NSButton *swatch in row.subviews)swatch.state=swatch.tag==[_tabs[@"hsl"]integerValue]?NSControlStateValueOn:NSControlStateValueOff; + if([row.identifier isEqual:@"hslPickerControls"]){NSButton *button=row.subviews.firstObject;button.title=lane<0?@"HSL 吸管 · 中性色":[@"HSL 吸管 · " stringByAppendingString:@[@"红",@"橙",@"黄",@"绿",@"青",@"蓝",@"紫",@"洋红"][lane]];button.accessibilityValue=lane<0?@"中性色,保留当前颜色":@[@"红",@"橙",@"黄",@"绿",@"青",@"蓝",@"紫",@"洋红"][lane];} + } + } + [self setNeedsLayout:YES];[self layoutSubtreeIfNeeded];NSAccessibilityPostNotification(self,NSAccessibilityLayoutChangedNotification); +} +- (void)sampleHSLLane:(id)sender { + if(_sampler)return; + _sampler=[[NSColorSampler alloc]init]; + [_sampler showSamplerWithSelectionHandler:^(NSColor *selectedColor){ + [self selectHSLColor:selectedColor];[_sampler release];_sampler=nil; + }]; +} - (void)sampleColorForWhiteBalance:(BOOL)whiteBalance { if(_sampler)return; _sampler=[[NSColorSampler alloc]init]; diff --git a/开发交接.md b/开发交接.md index 36c9f8a..b19fa19 100644 --- a/开发交接.md +++ b/开发交接.md @@ -2,9 +2,11 @@ 更新于2026-11-16(Asia/Shanghai)。 -## 本轮进行中:DJI 相机曲线预设 +## 本轮进行中:DJI 相机曲线预设与 HSL 吸管 -目标仅为大鱼调色的一级调色与独立 CST。基线 `883f680ade8706b8b89580ddc77c062a9a14dd39` 已回读远端一致;既有 Xcode 引用排序差异保留,不纳入本轮。新增稳定曲线 ID 31–34:御 4 Pro D-Log、Pocket 4 D-Log、Pocket 4P D-Log/D-Log 2,分别复用既有 11/12 的 GPU 解码与编码。色域仍独立选择:D-Log 配 DJI D-Gamut,D-Log 2 配 DJI D-Gamut 2。未将 D-Log M 冒充为 D-Log;本轮不新增无公开数学依据的御 4 Pro 专用 D-Log M 标定。版本准备为 1.22.3(138)。已加入输入/工作/输出 GPU 对比检查;模板重建与静态检查通过。首次构建发现诊断引用了未导出的私有函数,已改为经正式参数描述表检查菜单;继承的失效 SDKROOT 已用当前 Xcode SDK 环境修正。待 Release 自检、正式签名公证、安装宿主验收、PKG 与 Release 附件校验。此前 1.22.2 仍为当前正式安装。 +用户新增目标:HSL增加点取色吸管,按颜色切换八色调整项,暖肤色优先进入橙色;复用系统取色,主模块/独立层/工作区共用,灰色或取消保留选择,不写调色值。 + +相机预设目标仅为大鱼调色的一级调色与独立 CST。基线 `883f680ade8706b8b89580ddc77c062a9a14dd39` 已回读远端一致;既有 Xcode 引用排序差异保留,不纳入本轮。新增稳定曲线 ID 31–34:御 4 Pro D-Log、Pocket 4 D-Log、Pocket 4P D-Log/D-Log 2,分别复用既有 11/12 的 GPU 解码与编码。色域仍独立选择:D-Log 配 DJI D-Gamut,D-Log 2 配 DJI D-Gamut 2。未将 D-Log M 冒充为 D-Log;本轮不新增无公开数学依据的御 4 Pro 专用 D-Log M 标定。版本准备为 1.22.3(138)。已加入输入/工作/输出 GPU 对比检查;模板重建与静态检查通过。首次构建发现诊断引用了未导出的私有函数,已改为经正式参数描述表检查菜单;继承的失效 SDKROOT 已用当前 Xcode SDK 环境修正。首轮像素自检发现 ID31–33 在工作曲线位置需映射到原生 D-Log BASIS,已修复,输入与输出阶段此前通过;失败诊断保留在固定缓存 `dji-alias-working-first-failure.json`。待修复后自检、正式签名公证、安装宿主验收、PKG 与 Release 附件校验。此前 1.22.2 仍为当前正式安装。 ## 当前结果