Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit ab99912

Browse files
committed
HDR: use ReferencePeakHDRLuminance for tone mapping --target-peak
1 parent 3cbe7b8 commit ab99912

File tree

4 files changed

+33
-24
lines changed

4 files changed

+33
-24
lines changed

iina.xcodeproj/project.pbxproj

+4
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@
171171
AD63BF8429AEF1A100A63251 /* libavcodec.60.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = AD63BF7A29AEF1A000A63251 /* libavcodec.60.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
172172
AD70988927E0DD9200BD7795 /* libmpv.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AD70988827E0DD9200BD7795 /* libmpv.2.dylib */; };
173173
AD70988A27E0DD9200BD7795 /* libmpv.2.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = AD70988827E0DD9200BD7795 /* libmpv.2.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
174+
ADD4287F29AF39450057386F /* CoreDisplay.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ADD4287E29AF39450057386F /* CoreDisplay.framework */; };
174175
B206FFD92415439600E3B8B7 /* FourCharCode+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B206FFD82415439600E3B8B7 /* FourCharCode+Extensions.swift */; };
175176
B2133D6A240D8FDA001B6095 /* IINA.sdef in Resources */ = {isa = PBXBuildFile; fileRef = B2133D69240D8FDA001B6095 /* IINA.sdef */; };
176177
B2133D6D240E07AC001B6095 /* AppDelegate+Scripting.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2133D6C240E07AC001B6095 /* AppDelegate+Scripting.swift */; };
@@ -946,6 +947,7 @@
946947
AD63BF7929AEF1A000A63251 /* libswscale.7.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libswscale.7.dylib; path = deps/lib/libswscale.7.dylib; sourceTree = "<group>"; };
947948
AD63BF7A29AEF1A000A63251 /* libavcodec.60.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavcodec.60.dylib; path = deps/lib/libavcodec.60.dylib; sourceTree = "<group>"; };
948949
AD70988827E0DD9200BD7795 /* libmpv.2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libmpv.2.dylib; path = deps/lib/libmpv.2.dylib; sourceTree = "<group>"; };
950+
ADD4287E29AF39450057386F /* CoreDisplay.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreDisplay.framework; path = ../../../System/Library/Frameworks/CoreDisplay.framework; sourceTree = "<group>"; };
949951
B206FFD82415439600E3B8B7 /* FourCharCode+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FourCharCode+Extensions.swift"; sourceTree = "<group>"; };
950952
B2133D69240D8FDA001B6095 /* IINA.sdef */ = {isa = PBXFileReference; lastKnownFileType = text; path = IINA.sdef; sourceTree = "<group>"; };
951953
B2133D6C240E07AC001B6095 /* AppDelegate+Scripting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+Scripting.swift"; sourceTree = "<group>"; };
@@ -1249,6 +1251,7 @@
12491251
isa = PBXFrameworksBuildPhase;
12501252
buildActionMask = 2147483647;
12511253
files = (
1254+
ADD4287F29AF39450057386F /* CoreDisplay.framework in Frameworks */,
12521255
B4E4470125CE3F930069F06E /* Sparkle in Frameworks */,
12531256
AD63BF7B29AEF1A000A63251 /* libavformat.60.dylib in Frameworks */,
12541257
8451E6D92604AEFC009A15D7 /* Just in Frameworks */,
@@ -1373,6 +1376,7 @@
13731376
848290731D95978100C3C76C /* Frameworks */ = {
13741377
isa = PBXGroup;
13751378
children = (
1379+
ADD4287E29AF39450057386F /* CoreDisplay.framework */,
13761380
AD63BF7A29AEF1A000A63251 /* libavcodec.60.dylib */,
13771381
AD63BF7829AEF1A000A63251 /* libavfilter.9.dylib */,
13781382
AD63BF7629AEF1A000A63251 /* libavformat.60.dylib */,

iina/Base.lproj/PrefCodecViewController.xib

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="20037" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
33
<dependencies>
44
<deployment identifier="macosx"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="20037"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
66
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
77
</dependencies>
88
<objects>
@@ -30,27 +30,27 @@
3030
</customView>
3131
<userDefaultsController representsSharedInstance="YES" id="pxc-7C-SGP"/>
3232
<customView id="gZf-gF-XoY">
33-
<rect key="frame" x="0.0" y="0.0" width="444" height="498"/>
33+
<rect key="frame" x="0.0" y="0.0" width="444" height="526"/>
3434
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
3535
<subviews>
3636
<textField identifier="SectionTitleVideo" horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2BH-mP-kfr">
37-
<rect key="frame" x="-2" y="474" width="46" height="16"/>
37+
<rect key="frame" x="-2" y="502" width="46" height="16"/>
3838
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="left" title="Video:" id="m5P-5f-5uo">
3939
<font key="font" metaFont="systemBold"/>
4040
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
4141
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
4242
</textFieldCell>
4343
</textField>
4444
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="paR-ax-h5M">
45-
<rect key="frame" x="118" y="474" width="122" height="16"/>
45+
<rect key="frame" x="118" y="502" width="122" height="16"/>
4646
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Number of threads:" id="50C-1R-wlJ">
4747
<font key="font" metaFont="system"/>
4848
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
4949
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
5050
</textFieldCell>
5151
</textField>
5252
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="NZA-64-tXh">
53-
<rect key="frame" x="246" y="471" width="58" height="21"/>
53+
<rect key="frame" x="246" y="499" width="58" height="21"/>
5454
<constraints>
5555
<constraint firstAttribute="width" constant="58" id="GLI-3U-bmm"/>
5656
</constraints>
@@ -71,15 +71,15 @@
7171
</connections>
7272
</textField>
7373
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="kas-7q-TbK">
74-
<rect key="frame" x="312" y="474" width="92" height="14"/>
74+
<rect key="frame" x="312" y="502" width="92" height="14"/>
7575
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Default: 0 (Auto)" id="bxW-np-SGm">
7676
<font key="font" metaFont="label" size="11"/>
7777
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
7878
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
7979
</textFieldCell>
8080
</textField>
8181
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="EWs-Ib-pVZ">
82-
<rect key="frame" x="243" y="435" width="127" height="25"/>
82+
<rect key="frame" x="243" y="463" width="127" height="25"/>
8383
<constraints>
8484
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="120" id="P27-F4-Ogg"/>
8585
</constraints>
@@ -100,23 +100,23 @@
100100
</connections>
101101
</popUpButton>
102102
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="0Re-PY-hmC">
103-
<rect key="frame" x="118" y="424" width="328" height="14"/>
103+
<rect key="frame" x="118" y="452" width="328" height="14"/>
104104
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Label" id="n3r-mP-f8V">
105105
<font key="font" metaFont="label" size="11"/>
106106
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
107107
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
108108
</textFieldCell>
109109
</textField>
110110
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4rB-d2-drE">
111-
<rect key="frame" x="118" y="442" width="122" height="16"/>
111+
<rect key="frame" x="118" y="470" width="122" height="16"/>
112112
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Hardware decoder:" id="nwg-2K-G2G">
113113
<font key="font" metaFont="system"/>
114114
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
115115
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
116116
</textFieldCell>
117117
</textField>
118118
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xXS-nP-Chk">
119-
<rect key="frame" x="118" y="395" width="156" height="18"/>
119+
<rect key="frame" x="118" y="423" width="156" height="18"/>
120120
<buttonCell key="cell" type="check" title="Force dedicated GPU" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="YUr-aJ-xfC">
121121
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
122122
<font key="font" metaFont="system"/>
@@ -126,15 +126,15 @@
126126
</connections>
127127
</button>
128128
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="40Z-9R-jw0">
129-
<rect key="frame" x="118" y="364" width="328" height="28"/>
129+
<rect key="frame" x="118" y="392" width="328" height="28"/>
130130
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Always use the dedicated GPU for rendering (if it exists). This can improve performance but may reduce battery life." id="gCv-sJ-uQJ">
131131
<font key="font" metaFont="label" size="11"/>
132132
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
133133
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
134134
</textFieldCell>
135135
</textField>
136136
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="H9a-N4-xDt">
137-
<rect key="frame" x="118" y="339" width="124" height="18"/>
137+
<rect key="frame" x="118" y="367" width="124" height="18"/>
138138
<buttonCell key="cell" type="check" title="Load ICC profile" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="3g4-jW-uJd">
139139
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
140140
<font key="font" metaFont="system"/>
@@ -144,23 +144,23 @@
144144
</connections>
145145
</button>
146146
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="IQ8-K4-5CX">
147-
<rect key="frame" x="118" y="308" width="328" height="28"/>
147+
<rect key="frame" x="118" y="336" width="328" height="28"/>
148148
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Load the ICC profile for current display and use it to transform video RGB to screen output. (Only for SDR mode)" id="M2M-of-gjd">
149149
<font key="font" metaFont="label" size="11"/>
150150
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
151151
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
152152
</textFieldCell>
153153
</textField>
154154
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="VBh-HJ-Hsl">
155-
<rect key="frame" x="118" y="252" width="328" height="28"/>
155+
<rect key="frame" x="118" y="280" width="328" height="28"/>
156156
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Enable HDR mode when playing HDR videos. Uncheck this button if you encounter any issues." id="AF3-Hf-nll">
157157
<font key="font" metaFont="label" size="11"/>
158158
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
159159
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
160160
</textFieldCell>
161161
</textField>
162162
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jf6-xG-UF1">
163-
<rect key="frame" x="118" y="283" width="200" height="18"/>
163+
<rect key="frame" x="118" y="311" width="200" height="18"/>
164164
<buttonCell key="cell" type="check" title="Enable HDR mode by default" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="oMN-7X-c5d">
165165
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
166166
<font key="font" metaFont="system"/>
@@ -170,15 +170,15 @@
170170
</connections>
171171
</button>
172172
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nuY-oY-ief">
173-
<rect key="frame" x="118" y="102" width="80" height="16"/>
173+
<rect key="frame" x="118" y="130" width="80" height="16"/>
174174
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Target peak:" id="xVk-OA-kOf">
175175
<font key="font" metaFont="system"/>
176176
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
177177
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
178178
</textFieldCell>
179179
</textField>
180180
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="w2K-eR-xqK">
181-
<rect key="frame" x="204" y="99" width="58" height="21"/>
181+
<rect key="frame" x="204" y="127" width="58" height="21"/>
182182
<constraints>
183183
<constraint firstAttribute="width" constant="58" id="eGm-nT-ceU"/>
184184
</constraints>
@@ -199,7 +199,7 @@
199199
</connections>
200200
</textField>
201201
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bL4-aH-JLz">
202-
<rect key="frame" x="264" y="102" width="26" height="16"/>
202+
<rect key="frame" x="264" y="130" width="26" height="16"/>
203203
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="nits" id="baO-xy-7hD">
204204
<font key="font" metaFont="system"/>
205205
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -240,7 +240,7 @@
240240
</textFieldCell>
241241
</textField>
242242
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ty3-Qg-ysu">
243-
<rect key="frame" x="118" y="227" width="154" height="18"/>
243+
<rect key="frame" x="118" y="255" width="154" height="18"/>
244244
<buttonCell key="cell" type="check" title="Enable tone mapping" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="a5Y-gU-JTj">
245245
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
246246
<font key="font" metaFont="system"/>
@@ -251,7 +251,7 @@
251251
</connections>
252252
</button>
253253
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="oPy-hC-O47">
254-
<rect key="frame" x="118" y="126" width="328" height="98"/>
254+
<rect key="frame" x="118" y="154" width="328" height="98"/>
255255
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" id="mNn-cb-IVw">
256256
<font key="font" metaFont="label" size="11"/>
257257
<string key="title">Map one set of colors to another to approximate the appearance of high-dynamic-range images in a medium that has a more limited dynamic range. ( From Wikipedia )
@@ -262,10 +262,10 @@ Use tone mapping algorithm if you want gamut reduction. For example: playing HDR
262262
</textFieldCell>
263263
</textField>
264264
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="6Tu-h1-NQu">
265-
<rect key="frame" x="118" y="67" width="328" height="28"/>
265+
<rect key="frame" x="118" y="67" width="328" height="56"/>
266266
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" id="aTt-aZ-rjK">
267267
<font key="font" metaFont="label" size="11"/>
268-
<string key="title">Maximum luminance supported by your screen
268+
<string key="title">Maximum luminance supported by your screen
if set to 0, IINA will try to detect the maximum luminance of current monitor
269269
Ref: https://mpv.io/manual/master/#options-target-peak</string>
270270
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
271271
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>

0 commit comments

Comments
 (0)