summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2015-10-09 23:01:58 +0200
committerDamiano Galassi <[email protected]>2015-10-09 23:01:58 +0200
commitedb37c75b9072ef9f3abae398f5562459ab07977 (patch)
treee58f065ae533079f2dbb99d74fc0528a0f284118
parentb899bfa36ab7f42761d00b355289a9b91445bdfd (diff)
MacGui: use the new deinterlate preset keys
-rw-r--r--macosx/English.lproj/HBPictureViewController.xib351
-rw-r--r--macosx/HBFilters+UIAdditions.h14
-rw-r--r--macosx/HBFilters+UIAdditions.m88
-rw-r--r--macosx/HBFilters.h6
-rw-r--r--macosx/HBFilters.m97
-rw-r--r--macosx/HBJob+HBJobConversion.m21
-rw-r--r--macosx/HBJob.m4
-rw-r--r--macosx/HBPreviewGenerator.m3
8 files changed, 240 insertions, 344 deletions
diff --git a/macosx/English.lproj/HBPictureViewController.xib b/macosx/English.lproj/HBPictureViewController.xib
index a76aa2932..44e364914 100644
--- a/macosx/English.lproj/HBPictureViewController.xib
+++ b/macosx/English.lproj/HBPictureViewController.xib
@@ -568,231 +568,6 @@ Using this filter on such sources can result in smaller file sizes.</string>
<binding destination="-2" name="value" keyPath="self.filters.denoiseCustomString" id="MUd-3J-rBA"/>
</connections>
</textField>
- <matrix verticalHuggingPriority="750" allowsEmptySelection="NO" id="V5h-RE-c1g">
- <rect key="frame" x="310" y="104" width="83" height="42"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <string key="toolTip">Choose decomb or deinterlace filter options.
-The decomb filter selectively deinterlaces frames that appear to be interlaced.
-This will preserve quality in frames that are not interlaced.
-The classic deinterlace filter is applied to all frames.
-Frames that are not interlaced will suffer some quality degradation.</string>
- <animations/>
- <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
- <size key="cellSize" width="83" height="20"/>
- <size key="intercellSpacing" width="4" height="2"/>
- <buttonCell key="prototype" type="radio" title="Radio" imagePosition="left" alignment="left" controlSize="small" inset="2" id="0e7-lW-GxD" customClass="HBHUDButtonCell">
- <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
- <font key="font" metaFont="smallSystem"/>
- </buttonCell>
- <cells>
- <column>
- <buttonCell type="radio" title="Deinterlace" imagePosition="left" alignment="left" controlSize="small" state="on" tag="1" inset="2" id="OVg-jG-Uzq">
- <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
- <font key="font" metaFont="smallSystem"/>
- </buttonCell>
- <buttonCell type="radio" title="Decomb" imagePosition="left" alignment="left" controlSize="small" inset="2" id="CCd-Kk-NlW">
- <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
- <font key="font" metaFont="smallSystem"/>
- </buttonCell>
- </column>
- </cells>
- <connections>
- <binding destination="-2" name="enabled" keyPath="self.filters" id="KA3-LF-11B">
- <dictionary key="options">
- <string key="NSValueTransformerName">NSIsNotNil</string>
- </dictionary>
- </binding>
- <binding destination="-2" name="selectedIndex" keyPath="self.filters.useDecomb" id="dze-Gw-CZJ"/>
- </connections>
- </matrix>
- <box autoresizesSubviews="NO" title="Box" borderType="none" titlePosition="noTitle" id="Mmn-Ae-9Yn" userLabel="Decomb Box">
- <rect key="frame" x="233" y="43" width="207" height="62"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <view key="contentView">
- <rect key="frame" x="0.0" y="0.0" width="207" height="62"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <subviews>
- <textField verticalHuggingPriority="750" id="7iW-iI-CHT">
- <rect key="frame" x="11" y="38" width="61" height="14"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <animations/>
- <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Decomb:" id="bkd-Rb-wwr">
- <font key="font" metaFont="smallSystem"/>
- <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
- <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
- </textFieldCell>
- <connections>
- <binding destination="-2" name="textColor" keyPath="self.labelColor" id="LZV-5c-GTF"/>
- </connections>
- </textField>
- <textField verticalHuggingPriority="750" id="EoC-qG-nlq">
- <rect key="frame" x="11" y="12" width="61" height="14"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <animations/>
- <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Custom:" id="VaB-Av-TDu">
- <font key="font" metaFont="smallSystem"/>
- <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
- <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
- </textFieldCell>
- <connections>
- <binding destination="-2" name="hidden" keyPath="self.filters.customDecombSelected" id="kgj-zy-TW7">
- <dictionary key="options">
- <string key="NSValueTransformerName">NSNegateBoolean</string>
- </dictionary>
- </binding>
- <binding destination="-2" name="textColor" keyPath="self.labelColor" id="6zF-wn-AFg"/>
- </connections>
- </textField>
- <popUpButton verticalHuggingPriority="750" id="kP2-Gv-DZV">
- <rect key="frame" x="75" y="33" width="114" height="22"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <animations/>
- <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" id="5f8-gV-wzv">
- <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
- <font key="font" metaFont="smallSystem"/>
- <menu key="menu" title="OtherViews" id="hOC-Xe-RPE"/>
- </popUpButtonCell>
- <connections>
- <accessibilityConnection property="title" destination="7iW-iI-CHT" id="PnI-bH-5TP"/>
- <binding destination="-2" name="enabled" keyPath="self.filters" id="1ZK-xB-Tcj">
- <dictionary key="options">
- <string key="NSValueTransformerName">NSIsNotNil</string>
- </dictionary>
- </binding>
- <binding destination="-2" name="selectedValue" keyPath="self.filters.decomb" previousBinding="3Cu-Eh-e6g" id="ShC-Oj-9Cr">
- <dictionary key="options">
- <string key="NSValueTransformerName">HBDecombTransformer</string>
- </dictionary>
- </binding>
- <binding destination="-2" name="contentValues" keyPath="self.filters.decombSettings" id="3Cu-Eh-e6g"/>
- </connections>
- </popUpButton>
- <textField verticalHuggingPriority="750" id="dNc-Lj-0eP">
- <rect key="frame" x="78" y="9" width="108" height="19"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <string key="toolTip">Custom decomb filter string format:
-Mode:SpatialMetric:MotionThresh:SpatialThresh:BlockThresh:BlockWidth:BlockHeight:MagnitudeThres:VarianceThres:LaplacianThresh:DilationThresh:ErosionThresh:NoiseThresh:MaxSearchDistance:PostProcessing:Parity</string>
- <animations/>
- <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="cDZ-Od-pI6">
- <font key="font" metaFont="smallSystem"/>
- <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
- <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
- </textFieldCell>
- <accessibility description="Custom decomb settings."/>
- <connections>
- <binding destination="-2" name="hidden" keyPath="self.filters.customDecombSelected" id="Ftt-V0-qz8">
- <dictionary key="options">
- <string key="NSValueTransformerName">NSNegateBoolean</string>
- </dictionary>
- </binding>
- <binding destination="UZ0-eg-oV8" name="value" keyPath="values.self.filters.decombCustomString" id="lJH-aM-3yE"/>
- </connections>
- </textField>
- </subviews>
- <animations/>
- </view>
- <animations/>
- <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
- <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
- <connections>
- <binding destination="-2" name="hidden" keyPath="self.filters.useDecomb" id="Qt8-ik-TyT">
- <dictionary key="options">
- <string key="NSValueTransformerName">NSNegateBoolean</string>
- </dictionary>
- </binding>
- </connections>
- </box>
- <box autoresizesSubviews="NO" title="Box" borderType="none" titlePosition="noTitle" id="N21-it-wjY" userLabel="Deinterlace Box">
- <rect key="frame" x="233" y="43" width="207" height="62"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <view key="contentView">
- <rect key="frame" x="0.0" y="0.0" width="207" height="62"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <subviews>
- <textField verticalHuggingPriority="750" id="xKf-yr-nCk">
- <rect key="frame" x="4" y="38" width="68" height="14"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <animations/>
- <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Deinterlace:" id="VsK-mC-9Pj">
- <font key="font" metaFont="smallSystem"/>
- <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
- <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
- </textFieldCell>
- <connections>
- <binding destination="-2" name="textColor" keyPath="self.labelColor" id="PYk-vE-y5t"/>
- </connections>
- </textField>
- <textField verticalHuggingPriority="750" id="C83-aJ-v3x">
- <rect key="frame" x="23" y="12" width="49" height="14"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <animations/>
- <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Custom:" id="n6U-tH-vo0">
- <font key="font" metaFont="smallSystem"/>
- <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
- <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
- </textFieldCell>
- <connections>
- <binding destination="-2" name="hidden" keyPath="self.filters.customDeinterlaceSelected" id="kHC-eH-FKE">
- <dictionary key="options">
- <string key="NSValueTransformerName">NSNegateBoolean</string>
- </dictionary>
- </binding>
- <binding destination="-2" name="textColor" keyPath="self.labelColor" id="OOp-ec-hRZ"/>
- </connections>
- </textField>
- <popUpButton verticalHuggingPriority="750" id="xct-UB-bKm">
- <rect key="frame" x="75" y="33" width="114" height="22"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <animations/>
- <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" id="CsF-zp-vt2">
- <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
- <font key="font" metaFont="smallSystem"/>
- <menu key="menu" title="OtherViews" id="PyP-FP-gGx"/>
- </popUpButtonCell>
- <connections>
- <accessibilityConnection property="title" destination="xKf-yr-nCk" id="9ol-TG-r46"/>
- <binding destination="-2" name="enabled" keyPath="self.filters" id="M9v-44-EJq">
- <dictionary key="options">
- <string key="NSValueTransformerName">NSIsNotNil</string>
- </dictionary>
- </binding>
- <binding destination="-2" name="selectedValue" keyPath="self.filters.deinterlace" previousBinding="41E-Fv-hq1" id="RN0-ZY-YXU">
- <dictionary key="options">
- <string key="NSValueTransformerName">HBDeinterlaceTransformer</string>
- </dictionary>
- </binding>
- <binding destination="-2" name="contentValues" keyPath="self.filters.deinterlaceSettings" id="41E-Fv-hq1"/>
- </connections>
- </popUpButton>
- <textField verticalHuggingPriority="750" id="r64-vI-ymx">
- <rect key="frame" x="78" y="9" width="108" height="19"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <animations/>
- <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="OKz-qW-7ai">
- <font key="font" metaFont="smallSystem"/>
- <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
- <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
- </textFieldCell>
- <accessibility description="Custom deinterlace filter string format: YadifMode:YadifParity:McdintMode:McdeintQp"/>
- <connections>
- <binding destination="-2" name="hidden" keyPath="self.filters.customDeinterlaceSelected" id="h6M-Dy-tBR">
- <dictionary key="options">
- <string key="NSValueTransformerName">NSNegateBoolean</string>
- </dictionary>
- </binding>
- <binding destination="-2" name="value" keyPath="self.filters.deinterlaceCustomString" id="ej3-7F-ZV8"/>
- </connections>
- </textField>
- </subviews>
- <animations/>
- </view>
- <animations/>
- <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
- <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
- <connections>
- <binding destination="-2" name="hidden" keyPath="self.filters.useDecomb" id="ja4-Mj-2gB"/>
- </connections>
- </box>
<textField verticalHuggingPriority="750" id="A6i-ft-02b">
<rect key="frame" x="484" y="78" width="34" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
@@ -924,7 +699,7 @@ Players will scale the image in order to achieve the specified aspect.</string>
<rect key="frame" x="151" y="281" width="15" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
- <stepperCell key="cell" controlSize="small" continuous="YES" alignment="left" increment="16" minValue="64" maxValue="59" doubleValue="59" id="NP7-P2-Qga">
+ <stepperCell key="cell" controlSize="small" continuous="YES" alignment="left" increment="16" minValue="64" maxValue="59" doubleValue="64" id="NP7-P2-Qga">
<font key="font" metaFont="smallSystem"/>
</stepperCell>
<connections>
@@ -1214,7 +989,7 @@ Players will scale the image in order to achieve the specified aspect.</string>
<rect key="frame" x="240" y="281" width="15" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
- <stepperCell key="cell" controlSize="small" continuous="YES" alignment="left" increment="16" minValue="64" maxValue="59" doubleValue="59" id="MwK-aS-Oaf">
+ <stepperCell key="cell" controlSize="small" continuous="YES" alignment="left" increment="16" minValue="64" maxValue="59" doubleValue="64" id="MwK-aS-Oaf">
<font key="font" metaFont="smallSystem"/>
</stepperCell>
<connections>
@@ -1258,6 +1033,128 @@ Players will scale the image in order to achieve the specified aspect.</string>
<binding destination="-2" name="maxValue" keyPath="self.picture.maxHorizontalCrop" id="HGA-OB-h94"/>
</connections>
</stepper>
+ <textField verticalHuggingPriority="750" id="xKf-yr-nCk">
+ <rect key="frame" x="240" y="130" width="68" height="14"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+ <animations/>
+ <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Deinterlace:" id="VsK-mC-9Pj">
+ <font key="font" metaFont="smallSystem"/>
+ <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ <connections>
+ <binding destination="-2" name="textColor" keyPath="self.labelColor" id="PYk-vE-y5t"/>
+ </connections>
+ </textField>
+ <textField verticalHuggingPriority="750" id="C83-aJ-v3x">
+ <rect key="frame" x="259" y="79" width="49" height="14"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+ <animations/>
+ <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Custom:" id="n6U-tH-vo0">
+ <font key="font" metaFont="smallSystem"/>
+ <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ <connections>
+ <binding destination="-2" name="hidden" keyPath="self.filters.customDeinterlaceSelected" id="kHC-eH-FKE">
+ <dictionary key="options">
+ <string key="NSValueTransformerName">NSNegateBoolean</string>
+ </dictionary>
+ </binding>
+ <binding destination="-2" name="textColor" keyPath="self.labelColor" id="OOp-ec-hRZ"/>
+ </connections>
+ </textField>
+ <popUpButton verticalHuggingPriority="750" id="xct-UB-bKm">
+ <rect key="frame" x="311" y="125" width="114" height="22"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+ <string key="toolTip">Choose decomb or deinterlace filter options.
+The decomb filter selectively deinterlaces frames that appear to be interlaced.
+This will preserve quality in frames that are not interlaced.
+The classic deinterlace filter is applied to all frames.
+Frames that are not interlaced will suffer some quality degradation.</string>
+ <animations/>
+ <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" id="CsF-zp-vt2">
+ <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
+ <font key="font" metaFont="smallSystem"/>
+ <menu key="menu" title="OtherViews" id="PyP-FP-gGx"/>
+ </popUpButtonCell>
+ <connections>
+ <accessibilityConnection property="title" destination="xKf-yr-nCk" id="9ol-TG-r46"/>
+ <binding destination="-2" name="enabled" keyPath="self.filters" id="M9v-44-EJq">
+ <dictionary key="options">
+ <string key="NSValueTransformerName">NSIsNotNil</string>
+ </dictionary>
+ </binding>
+ <binding destination="-2" name="selectedValue" keyPath="self.filters.deinterlace" previousBinding="1XG-JZ-nFn" id="jo4-ky-6QP">
+ <dictionary key="options">
+ <string key="NSValueTransformerName">HBDeinterlaceTransformer</string>
+ </dictionary>
+ </binding>
+ <binding destination="-2" name="contentValues" keyPath="self.filters.deinterlaceTypes" id="1XG-JZ-nFn"/>
+ </connections>
+ </popUpButton>
+ <textField verticalHuggingPriority="750" id="r64-vI-ymx">
+ <rect key="frame" x="314" y="76" width="108" height="19"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+ <animations/>
+ <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="OKz-qW-7ai">
+ <font key="font" metaFont="smallSystem"/>
+ <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ <accessibility description="Custom deinterlace filter string format: YadifMode:YadifParity:McdintMode:McdeintQp"/>
+ <connections>
+ <binding destination="-2" name="hidden" keyPath="self.filters.customDeinterlaceSelected" id="h6M-Dy-tBR">
+ <dictionary key="options">
+ <string key="NSValueTransformerName">NSNegateBoolean</string>
+ </dictionary>
+ </binding>
+ <binding destination="-2" name="value" keyPath="self.filters.deinterlaceCustomString" id="ej3-7F-ZV8"/>
+ </connections>
+ </textField>
+ <textField verticalHuggingPriority="750" id="9Uz-PL-igg">
+ <rect key="frame" x="248" y="104" width="61" height="14"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+ <animations/>
+ <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Preset:" id="zvZ-ZX-yKE">
+ <font key="font" metaFont="smallSystem"/>
+ <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ <connections>
+ <binding destination="-2" name="hidden" keyPath="self.filters.deinterlaceEnabled" id="9z5-2i-puG">
+ <dictionary key="options">
+ <string key="NSValueTransformerName">NSNegateBoolean</string>
+ </dictionary>
+ </binding>
+ <binding destination="-2" name="textColor" keyPath="self.labelColor" id="58H-r8-xBi"/>
+ </connections>
+ </textField>
+ <popUpButton verticalHuggingPriority="750" id="6nG-zk-FMo">
+ <rect key="frame" x="312" y="99" width="113" height="22"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+ <animations/>
+ <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" id="at1-DR-WGs">
+ <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
+ <font key="font" metaFont="smallSystem"/>
+ <menu key="menu" title="OtherViews" id="qey-Yo-9sX"/>
+ </popUpButtonCell>
+ <connections>
+ <accessibilityConnection property="title" destination="9Uz-PL-igg" id="EXp-0c-TdS"/>
+ <binding destination="-2" name="hidden" keyPath="self.filters.deinterlaceEnabled" id="gBQ-b8-r6y">
+ <dictionary key="options">
+ <string key="NSValueTransformerName">NSNegateBoolean</string>
+ </dictionary>
+ </binding>
+ <binding destination="-2" name="selectedValue" keyPath="self.filters.deinterlacePreset" previousBinding="ZVC-PA-ji4" id="4RE-n6-Oyz">
+ <dictionary key="options">
+ <string key="NSValueTransformerName">HBDeinterlacePresetTransformer</string>
+ </dictionary>
+ </binding>
+ <binding destination="-2" name="contentValues" keyPath="self.filters.deinterlacePresets" id="ZVC-PA-ji4"/>
+ <outlet property="nextKeyView" destination="1XQ-md-5cQ" id="LJa-RO-dzf"/>
+ </connections>
+ </popUpButton>
</subviews>
<animations/>
<point key="canvasLocation" x="403.5" y="86.5"/>
diff --git a/macosx/HBFilters+UIAdditions.h b/macosx/HBFilters+UIAdditions.h
index 7e61ac0a0..71ca839bc 100644
--- a/macosx/HBFilters+UIAdditions.h
+++ b/macosx/HBFilters+UIAdditions.h
@@ -13,6 +13,8 @@
* Getters to get the possible values for the filters.
*/
+ (NSDictionary *)detelecinePresetsDict;
+
++ (NSDictionary *)deinterlaceTypesDict;
+ (NSDictionary *)decombPresetsDict;
+ (NSDictionary *)deinterlacePresetsDict;
@@ -21,7 +23,8 @@
+ (NSDictionary *)denoiseTypesDict;
- (BOOL)customDetelecineSelected;
-- (BOOL)customDecombSelected;
+
+- (BOOL)deinterlaceEnabled;
- (BOOL)customDeinterlaceSelected;
- (BOOL)denoiseEnabled;
@@ -31,8 +34,9 @@
- (NSString *)deblockSummary;
@property (nonatomic, readonly) NSArray *detelecineSettings;
-@property (nonatomic, readonly) NSArray *deinterlaceSettings;
-@property (nonatomic, readonly) NSArray *decombSettings;
+
+@property (nonatomic, readonly) NSArray *deinterlaceTypes;
+@property (nonatomic, readonly) NSArray *deinterlacePresets;
@property (nonatomic, readonly) NSArray *denoiseTypes;
@property (nonatomic, readonly) NSArray *denoisePresets;
@@ -57,10 +61,10 @@
@interface HBDetelecineTransformer : HBGenericDictionaryTransformer
@end
-@interface HBDecombTransformer : HBGenericDictionaryTransformer
+@interface HBDeinterlaceTransformer : HBGenericDictionaryTransformer
@end
-@interface HBDeinterlaceTransformer : HBGenericDictionaryTransformer
+@interface HBDeinterlacePresetTransformer : HBGenericDictionaryTransformer
@end
@interface HBDenoisePresetTransformer : HBGenericDictionaryTransformer
diff --git a/macosx/HBFilters+UIAdditions.m b/macosx/HBFilters+UIAdditions.m
index 230022cc7..08e5198e4 100644
--- a/macosx/HBFilters+UIAdditions.m
+++ b/macosx/HBFilters+UIAdditions.m
@@ -79,24 +79,28 @@ static NSDictionary * filterParamsToNamesDict(hb_filter_param_t * (f)(int), int
@end
-@implementation HBDecombTransformer
+@implementation HBDeinterlaceTransformer
- (instancetype)init
{
if (self = [super init])
- self.dict = [HBFilters decombPresetsDict];
+ self.dict = [HBFilters deinterlaceTypesDict];
return self;
}
@end
-@implementation HBDeinterlaceTransformer
+@implementation HBDeinterlacePresetTransformer
- (instancetype)init
{
if (self = [super init])
- self.dict = [HBFilters deinterlacePresetsDict];
+ {
+ NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary:[HBFilters deinterlacePresetsDict]];
+ [dict addEntriesFromDictionary:[HBFilters decombPresetsDict]];
+ self.dict = [dict copy];
+ }
return self;
}
@@ -162,6 +166,8 @@ static NSDictionary * filterParamsToNamesDict(hb_filter_param_t * (f)(int), int
@end
static NSDictionary *detelecinePresetsDict = nil;
+
+static NSDictionary *deinterlaceTypesDict = nil;
static NSDictionary *decombPresetsDict = nil;
static NSDictionary *deinterlacePresetsDict = nil;
@@ -182,6 +188,22 @@ static NSDictionary *denoiseTypesDict = nil;
return detelecinePresetsDict;
}
++ (NSDictionary *)deinterlaceTypesDict
+{
+ if (!deinterlaceTypesDict)
+ {
+ deinterlaceTypesDict = @{NSLocalizedString(@"Off", nil): @"off",
+ NSLocalizedString(@"Deinterlace", nil): @"deinterlace",
+ NSLocalizedString(@"Decomb", nil): @"decomb"};;
+ }
+ return deinterlaceTypesDict;
+}
+
+- (NSArray *)deinterlaceTypes
+{
+ return @[@"Off", @"Deinterlace", @"Decomb"];
+}
+
+ (NSDictionary *)decombPresetsDict
{
if (!decombPresetsDict)
@@ -234,14 +256,16 @@ static NSDictionary *denoiseTypesDict = nil;
return filterParamsToNamesArray(hb_filter_param_get_presets, HB_FILTER_DETELECINE);
}
-- (NSArray *)decombSettings
-{
- return filterParamsToNamesArray(hb_filter_param_get_presets, HB_FILTER_DECOMB);
-}
-
-- (NSArray *)deinterlaceSettings
+- (NSArray *)deinterlacePresets
{
- return filterParamsToNamesArray(hb_filter_param_get_presets, HB_FILTER_DEINTERLACE);
+ if ([self.deinterlace isEqualToString:@"deinterlace"])
+ {
+ return filterParamsToNamesArray(hb_filter_param_get_presets, HB_FILTER_DEINTERLACE);
+ }
+ else
+ {
+ return filterParamsToNamesArray(hb_filter_param_get_presets, HB_FILTER_DECOMB);
+ }
}
- (NSArray *)denoiseTypes
@@ -264,14 +288,9 @@ static NSDictionary *denoiseTypesDict = nil;
return [self.detelecine isEqualToString:@"custom"] ? YES : NO;
}
-- (BOOL)customDecombSelected
-{
- return [self.decomb isEqualToString:@"custom"] ? YES : NO;
-}
-
- (BOOL)customDeinterlaceSelected
{
- return [self.deinterlace isEqualToString:@"custom"] ? YES : NO;
+ return [self.deinterlacePreset isEqualToString:@"custom"] && [self deinterlaceEnabled];
}
- (BOOL)denoiseEnabled
@@ -279,6 +298,11 @@ static NSDictionary *denoiseTypesDict = nil;
return ![self.denoise isEqualToString:@"off"];
}
+- (BOOL)deinterlaceEnabled
+{
+ return ![self.deinterlace isEqualToString:@"off"];
+}
+
- (BOOL)customDenoiseSelected
{
return [self.denoisePreset isEqualToString:@"custom"] && [self denoiseEnabled];
@@ -317,29 +341,25 @@ static NSDictionary *denoiseTypesDict = nil;
[summary appendFormat:@" - Detelecine (%@)", [[[HBFilters detelecinePresetsDict] allKeysForObject:self.detelecine] firstObject]];
}
}
-
- if (self.useDecomb && ![self.decomb isEqualToString:@"off"])
- {
- // Decomb
- if ([self.decomb isEqualToString:@"custom"])
- {
- [summary appendFormat:@" - Decomb (%@)", self.decombCustomString];
- }
- else
- {
- [summary appendFormat:@" - Decomb (%@)", [[[HBFilters decombPresetsDict] allKeysForObject:self.decomb] firstObject]];
- }
- }
else if (![self.deinterlace isEqualToString:@"off"])
{
- // Deinterlace
- if ([self.deinterlace isEqualToString:@"custom"])
+ // Deinterlace or Decomb
+ NSString *type = [[[HBFilters deinterlaceTypesDict] allKeysForObject:self.deinterlace] firstObject];
+
+ if ([self.deinterlacePreset isEqualToString:@"custom"])
{
- [summary appendFormat:@" - Deinterlace (%@)", self.deinterlaceCustomString];
+ [summary appendFormat:@" - %@ (%@)", type, self.deinterlaceCustomString];
}
else
{
- [summary appendFormat:@" - Deinterlace (%@)", [[[HBFilters deinterlacePresetsDict] allKeysForObject:self.deinterlace] firstObject]];
+ if ([self.deinterlace isEqualToString:@"decomb"])
+ {
+ [summary appendFormat:@" - %@ (%@)", type, [[[HBFilters decombPresetsDict] allKeysForObject:self.deinterlacePreset] firstObject]];
+ }
+ else if ([self.deinterlace isEqualToString:@"deinterlace"])
+ {
+ [summary appendFormat:@" - %@ (%@)", type, [[[HBFilters deinterlacePresetsDict] allKeysForObject:self.deinterlacePreset] firstObject]];
+ }
}
}
diff --git a/macosx/HBFilters.h b/macosx/HBFilters.h
index edac30f84..4c8fec92b 100644
--- a/macosx/HBFilters.h
+++ b/macosx/HBFilters.h
@@ -19,14 +19,10 @@ extern NSString * const HBFiltersChangedNotification;
@property (nonatomic, readwrite, copy) NSString *detelecine;
@property (nonatomic, readwrite, copy) NSString *detelecineCustomString;
-@property (nonatomic, readwrite) BOOL useDecomb;
-
@property (nonatomic, readwrite, copy) NSString *deinterlace;
+@property (nonatomic, readwrite, copy) NSString *deinterlacePreset;
@property (nonatomic, readwrite, copy) NSString *deinterlaceCustomString;
-@property (nonatomic, readwrite, copy) NSString *decomb;
-@property (nonatomic, readwrite, copy) NSString *decombCustomString;
-
@property (nonatomic, readwrite, copy) NSString *denoise;
@property (nonatomic, readwrite, copy) NSString *denoisePreset;
@property (nonatomic, readwrite, copy) NSString *denoiseTune;
diff --git a/macosx/HBFilters.m b/macosx/HBFilters.m
index 7c672f056..2ce4e6cd9 100644
--- a/macosx/HBFilters.m
+++ b/macosx/HBFilters.m
@@ -27,8 +27,7 @@ NSString * const HBFiltersChangedNotification = @"HBFiltersChangedNotification";
_detelecineCustomString = @"";
_deinterlace = @"off";
_deinterlaceCustomString = @"";
- _decomb = @"off";
- _decombCustomString = @"";
+ _deinterlacePreset = @"fast";
_denoise = @"off";
_denoiseCustomString = @"";
_denoisePreset = @"medium";
@@ -89,45 +88,49 @@ NSString * const HBFiltersChangedNotification = @"HBFiltersChangedNotification";
{
_deinterlace = @"off";
}
+ [self validateDeinterlacePreset];
[self postChangedNotification];
}
-- (void)setDeinterlaceCustomString:(NSString *)deinterlaceCustomString
+- (void)setDeinterlacePreset:(NSString *)deinterlacePreset
{
- if (deinterlaceCustomString)
+ if (deinterlacePreset)
{
- _deinterlaceCustomString = [deinterlaceCustomString copy];
+ _deinterlacePreset = [deinterlacePreset copy];
}
else
{
- _deinterlaceCustomString = @"";
+ _deinterlacePreset = @"fast";
}
+ [self validateDeinterlacePreset];
[self postChangedNotification];
}
-- (void)setDecomb:(NSString *)decomb
+- (void)validateDeinterlacePreset
{
- if (decomb)
+ int filter_id = HB_FILTER_DECOMB;
+ if ([self.deinterlace isEqualToString:@"deinterlace"])
{
- _decomb = [decomb copy];
+ filter_id = HB_FILTER_DEINTERLACE;
}
- else
+
+ if (hb_validate_filter_preset(filter_id, self.deinterlacePreset.UTF8String, NULL) ||
+ ([self.deinterlacePreset isEqualToString:@"default"] && filter_id == HB_FILTER_DEINTERLACE))
{
- _decomb = @"off";
+ _deinterlacePreset = @"fast";
}
- [self postChangedNotification];
}
-- (void)setDecombCustomString:(NSString *)decombCustomString
+- (void)setDeinterlaceCustomString:(NSString *)deinterlaceCustomString
{
- if (decombCustomString)
+ if (deinterlaceCustomString)
{
- _decombCustomString = [decombCustomString copy];
+ _deinterlaceCustomString = [deinterlaceCustomString copy];
}
else
{
- _decombCustomString = @"";
+ _deinterlaceCustomString = @"";
}
[self postChangedNotification];
@@ -141,7 +144,7 @@ NSString * const HBFiltersChangedNotification = @"HBFiltersChangedNotification";
}
else
{
- _denoise = @"";
+ _denoise = @"off";
}
[self postChangedNotification];
@@ -201,25 +204,18 @@ NSString * const HBFiltersChangedNotification = @"HBFiltersChangedNotification";
[self postChangedNotification];
}
-- (void)setUseDecomb:(BOOL)useDecomb
-{
- _useDecomb = useDecomb;
- [self postChangedNotification];
-}
-
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key
{
NSSet *retval = nil;
if ([key isEqualToString:@"summary"])
{
- retval = [NSSet setWithObjects:@"detelecine", @"detelecineCustomString", @"useDecomb", @"deinterlace", @"deinterlaceCustomString", @"decomb", @"decombCustomString", @"denoise", @"denoisePreset", @"denoiseTune", @"denoiseCustomString", @"deblock", @"grayscale", nil];
+ retval = [NSSet setWithObjects:@"detelecine", @"detelecineCustomString", @"deinterlace", @"deinterlacePreset", @"deinterlaceCustomString", @"denoise", @"denoisePreset", @"denoiseTune", @"denoiseCustomString", @"deblock", @"grayscale", nil];
}
if ([key isEqualToString:@"customDetelecineSelected"] ||
- [key isEqualToString:@"customDecombSelected"] ||
[key isEqualToString:@"customDeinterlaceSelected"])
{
- retval = [NSSet setWithObjects:@"detelecine", @"decomb", @"deinterlace", @"useDecomb", nil];
+ retval = [NSSet setWithObjects:@"detelecine", @"deinterlace", nil];
}
if ([key isEqualToString:@"denoiseTunesAvailable"] ||
[key isEqualToString:@"customDenoiseSelected"])
@@ -230,6 +226,15 @@ NSString * const HBFiltersChangedNotification = @"HBFiltersChangedNotification";
{
retval = [NSSet setWithObject:@"denoise"];
}
+ if ([key isEqualToString:@"deinterlaceEnabled"])
+ {
+ retval = [NSSet setWithObject:@"deinterlace"];
+ }
+ if ([key isEqualToString:@"customDeinterlaceSelected"] ||
+ [key isEqualToString:@"deinterlacePresets"])
+ {
+ retval = [NSSet setWithObjects:@"deinterlace", @"deinterlacePreset", nil];
+ }
if ([key isEqualToString:@"deblockSummary"])
{
retval = [NSSet setWithObject:@"deblock"];
@@ -250,11 +255,9 @@ NSString * const HBFiltersChangedNotification = @"HBFiltersChangedNotification";
copy->_detelecineCustomString = [_detelecineCustomString copy];
copy->_deinterlace = [_deinterlace copy];
+ copy->_deinterlacePreset = [_deinterlacePreset copy];
copy->_deinterlaceCustomString = [_deinterlaceCustomString copy];
- copy->_decomb = [_decomb copy];
- copy->_decombCustomString = [_decombCustomString copy];
-
copy->_denoise = [_denoise copy];
copy->_denoisePreset = [_denoisePreset copy];
copy->_denoiseTune = [_denoiseTune copy];
@@ -262,8 +265,6 @@ NSString * const HBFiltersChangedNotification = @"HBFiltersChangedNotification";
copy->_deblock = _deblock;
copy->_grayscale = _grayscale;
-
- copy->_useDecomb = _useDecomb;
}
return copy;
@@ -278,17 +279,15 @@ NSString * const HBFiltersChangedNotification = @"HBFiltersChangedNotification";
- (void)encodeWithCoder:(NSCoder *)coder
{
- [coder encodeInt:1 forKey:@"HBFiltersVersion"];
+ [coder encodeInt:2 forKey:@"HBFiltersVersion"];
encodeObject(_detelecine);
encodeObject(_detelecineCustomString);
encodeObject(_deinterlace);
+ encodeObject(_deinterlacePreset);
encodeObject(_deinterlaceCustomString);
- encodeObject(_decomb);
- encodeObject(_decombCustomString);
-
encodeObject(_denoise);
encodeObject(_denoisePreset);
encodeObject(_denoiseTune);
@@ -296,8 +295,6 @@ NSString * const HBFiltersChangedNotification = @"HBFiltersChangedNotification";
encodeInt(_deblock);
encodeBool(_grayscale);
-
- encodeBool(_useDecomb);
}
- (instancetype)initWithCoder:(NSCoder *)decoder
@@ -308,11 +305,9 @@ NSString * const HBFiltersChangedNotification = @"HBFiltersChangedNotification";
decodeObject(_detelecineCustomString, NSString);
decodeObject(_deinterlace, NSString);
+ decodeObject(_deinterlacePreset, NSString)
decodeObject(_deinterlaceCustomString, NSString);
- decodeObject(_decomb, NSString);
- decodeObject(_decombCustomString, NSString);
-
decodeObject(_denoise, NSString);
decodeObject(_denoisePreset, NSString);
decodeObject(_denoiseTune, NSString);
@@ -321,8 +316,6 @@ NSString * const HBFiltersChangedNotification = @"HBFiltersChangedNotification";
decodeInt(_deblock);
decodeBool(_grayscale);
- decodeBool(_useDecomb);
-
_notificationsEnabled = YES;
return self;
@@ -332,14 +325,10 @@ NSString * const HBFiltersChangedNotification = @"HBFiltersChangedNotification";
- (void)writeToPreset:(NSMutableDictionary *)preset
{
- preset[@"PictureDecombDeinterlace"] = @(self.useDecomb);
-
- preset[@"PictureDeinterlace"] = self.deinterlace;
+ preset[@"PictureDeinterlaceFilter"] = self.deinterlace;
+ preset[@"PictureDeinterlacePreset"] = self.deinterlacePreset;
preset[@"PictureDeinterlaceCustom"] = self.deinterlaceCustomString;
- preset[@"PictureDecomb"] = self.decomb;
- preset[@"PictureDecombCustom"] = self.decombCustomString;
-
preset[@"PictureDetelecine"] = self.detelecine;
preset[@"PictureDetelecineCustom"] = self.detelecineCustomString;
@@ -359,16 +348,12 @@ NSString * const HBFiltersChangedNotification = @"HBFiltersChangedNotification";
// If the preset has an objectForKey:@"UsesPictureFilters", and handle the filters here
if ([preset[@"UsesPictureFilters"] boolValue])
{
- // We only allow *either* Decomb or Deinterlace. So check for the PictureDecombDeinterlace key.
- self.useDecomb = [preset[@"PictureDecombDeinterlace"] boolValue];
-
- self.decomb = preset[@"PictureDecomb"];
- self.decombCustomString = preset[@"PictureDecombCustom"];
-
- self.deinterlace = preset[@"PictureDeinterlace"];
+ // Deinterlace
+ self.deinterlace = preset[@"PictureDeinterlaceFilter"];
+ self.deinterlacePreset = preset[@"PictureDeinterlacePreset"];
self.deinterlaceCustomString = preset[@"PictureDeinterlaceCustom"];
- //Detelecine
+ // Detelecine
self.detelecine = preset[@"PictureDetelecine"];
self.detelecineCustomString = preset[@"PictureDetelecineCustom"];
diff --git a/macosx/HBJob+HBJobConversion.m b/macosx/HBJob+HBJobConversion.m
index 08514d55d..802eb2bda 100644
--- a/macosx/HBJob+HBJobConversion.m
+++ b/macosx/HBJob+HBJobConversion.m
@@ -429,22 +429,17 @@
hb_add_filter(job, filter, filter_str);
}
- if (self.filters.useDecomb && ![self.filters.decomb isEqualToString:@"off"])
+ // Deinterlace
+ if (![self.filters.deinterlace isEqualToString:@"off"])
{
- // Decomb
int filter_id = HB_FILTER_DECOMB;
+ if ([self.filters.deinterlace isEqualToString:@"deinterlace"])
+ {
+ filter_id = HB_FILTER_DEINTERLACE;
+ }
+
const char *filter_str = hb_generate_filter_settings(filter_id,
- self.filters.decomb.UTF8String,
- self.filters.decombCustomString.UTF8String);
- filter = hb_filter_init(filter_id);
- hb_add_filter(job, filter, filter_str);
- }
- else if (!self.filters.useDecomb && ![self.filters.deinterlace isEqualToString:@"off"])
- {
- // Deinterlace
- int filter_id = HB_FILTER_DEINTERLACE;
- const char *filter_str = hb_generate_filter_settings(filter_id,
- self.filters.deinterlace.UTF8String,
+ self.filters.deinterlacePreset.UTF8String,
self.filters.deinterlaceCustomString.UTF8String);
filter = hb_filter_init(filter_id);
hb_add_filter(job, filter, filter_str);
diff --git a/macosx/HBJob.m b/macosx/HBJob.m
index 69c649fd1..d3b51b3be 100644
--- a/macosx/HBJob.m
+++ b/macosx/HBJob.m
@@ -185,7 +185,7 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
- (void)encodeWithCoder:(NSCoder *)coder
{
- [coder encodeInt:1 forKey:@"HBVideoVersion"];
+ [coder encodeInt:1 forKey:@"HBJobVersion"];
encodeInt(_state);
encodeObject(_name);
@@ -215,7 +215,7 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
- (instancetype)initWithCoder:(NSCoder *)decoder
{
- int version = [decoder decodeIntForKey:@"HBVideoVersion"];
+ int version = [decoder decodeIntForKey:@"HBJobVersion"];
if (version == 1 && (self = [super init]))
{
diff --git a/macosx/HBPreviewGenerator.m b/macosx/HBPreviewGenerator.m
index 04fc055b0..d85f102e3 100644
--- a/macosx/HBPreviewGenerator.m
+++ b/macosx/HBPreviewGenerator.m
@@ -76,8 +76,7 @@
if (!theImage)
{
HBFilters *filters = self.job.filters;
- BOOL deinterlace = (![filters.deinterlace isEqualToString:@"off"] && !filters.useDecomb) ||
- (![filters.decomb isEqualToString:@"off"] && filters.useDecomb);
+ BOOL deinterlace = (![filters.deinterlace isEqualToString:@"off"]);
theImage = (CGImageRef)[self.scanCore copyImageAtIndex:index
forTitle:self.job.title