加入HSL点取色切换与肤色橙色优先,修正DLog工作曲线路由

这个提交包含在:
mac 于 2026-11-16 15:17:37 +08:00 提交
1 父节点 3005347a6b
当前提交 ca7221f073
9 个文件已更改
+101 -4

没有与搜索条件相匹配的文件

+12
查看文件
@@ -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 更新通道。
+6
查看文件
@@ -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」。独立效果打开对应模块,保留画面工具栏和控制面板,可继续添加其他调色模块。
+1 -1
查看文件
@@ -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",
+2
查看文件
@@ -41,6 +41,8 @@ typedef struct DYCMSettings {
#ifndef __METAL_VERSION__
#include <math.h>
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;}
}
+2
查看文件
@@ -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"
+22
查看文件
@@ -0,0 +1,22 @@
#pragma once
#include <algorithm>
#include <cmath>
// 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<closest){closest=distance;best=lane;}}
return best;
}
@@ -0,0 +1,28 @@
// Classifier boundaries and real native inspector selection, without opening a sampler.
{
const float points[][4]={{1,.04,.02,0},{1,.5,.02,1},{.95,.9,.02,2},{.03,.8,.05,3},{.02,.8,.8,4},{.02,.12,.9,5},{.55,.08,.95,6},{.95,.04,.6,7},
{.95,.8,.79,1},{.74,.46,.44,1},{.65,.42,.28,1},{.27,.16,.12,1},{.5,.5,.5,-1},{1,1,1,-1},{0,0,0,-1},{.5,.49,.48,-1},{NAN,.3,.2,-1}};
for(unsigned i=0;i<sizeof(points)/sizeof(points[0]);i++)run.record([NSString stringWithFormat:@"hsl-picker-colour-%02u",i],DYHSLPickedLane(points[i][0],points[i][1],points[i][2])==(int)points[i][3]);
DYDiagnosticManager *pickHost=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(pickHost,nil);
NSMutableDictionary *pickDoc=DYMutablePlist([[[DYToolDocument alloc]init]autorelease].document);NSDictionary *pickLayer=DYInsertTool(pickDoc,@"hsl",@"base:hsl");DYWriteTools(pickHost,pickDoc,kCMTimeZero);
DYToolManager *pickProxy=[[[DYToolManager alloc]initWithHost:pickHost node:pickLayer]autorelease];
NSArray *pickEditors=@[[[[DYInspector alloc]initWithAPIManager:pickHost]autorelease],[[[DYInspector alloc]initWithAPIManager:pickProxy]autorelease],[[[DYInspector alloc]initWithAPIManager:pickHost renderer:nil workspaceType:@"hsl"]autorelease]];
NSDictionary *pickBefore=[[pickHost->_values copy]autorelease];NSData *pickTools=[NSKeyedArchiver archivedDataWithRootObject:DYReadTools(pickHost,kCMTimeZero) requiringSecureCoding:YES error:nil];
for(NSUInteger editorIndex=0;editorIndex<pickEditors.count;editorIndex++){
DYInspector *editor=pickEditors[editorIndex];editor.frame=NSMakeRect(0,0,424,780);[editor refresh];[editor layoutSubtreeIfNeeded];
[(id)editor performSelector:@selector(selectHSLColor:) withObject:[NSColor colorWithSRGBRed:.02 green:.12 blue:.9 alpha:1]];
BOOL blue=[[(NSDictionary*)[editor valueForKey:@"tabs"]objectForKey:@"hsl"]integerValue]==5;
[(id)editor performSelector:@selector(selectHSLColor:) withObject:[NSColor colorWithSRGBRed:.95 green:.8 blue:.79 alpha:1]];
BOOL skin=[[(NSDictionary*)[editor valueForKey:@"tabs"]objectForKey:@"hsl"]integerValue]==1;
[(id)editor performSelector:@selector(selectHSLColor:) withObject:[NSColor colorWithSRGBRed:.5 green:.5 blue:.5 alpha:1]];
[(id)editor performSelector:@selector(selectHSLColor:) withObject:nil];
BOOL retained=[[(NSDictionary*)[editor valueForKey:@"tabs"]objectForKey:@"hsl"]integerValue]==1,button=NO,swatch=NO;
for(NSDictionary *card in [editor valueForKey:@"cards"])if([card[@"section"][@"key"]isEqual:@"hsl"]){
for(NSView *row in card[@"body"]){if([row.identifier isEqual:@"hslPickerControls"])button=[row.subviews.firstObject action]==@selector(sampleHSLLane:);
if([row.identifier isEqual:@"hslTabs"]){swatch=YES;for(NSButton *b in row.subviews)swatch&=(b.state==(b.tag==1?NSControlStateValueOn:NSControlStateValueOff));}}
}
run.record([NSString stringWithFormat:@"hsl-picker-native-editor-%lu",(unsigned long)editorIndex],blue&&skin&&retained&&button&&swatch);
}
NSData *pickAfter=[NSKeyedArchiver archivedDataWithRootObject:DYReadTools(pickHost,kCMTimeZero) requiringSecureCoding:YES error:nil];
run.record(@"hsl-picker-only-selects-no-grading-or-undo-write",[pickBefore isEqual:pickHost->_values]&&[pickTools isEqual:pickAfter]&&pickHost->_undoStarts==0);
}
+24 -1
查看文件
@@ -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<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
[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<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
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<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
- (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];
+4 -2
查看文件
@@ -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 仍为当前正式安装。
## 当前结果