From cc4a637adaa6677fecab50025463fefcc30c6a25 Mon Sep 17 00:00:00 2001 From: jbrjake Date: Fri, 18 Jun 2010 20:40:34 +0000 Subject: MacGui: Advanced x264 panel overhaul. - Updates labeling - Updates tooltips - Rearranges layout to group options by encoding features, analysis options, and psychovisual options - Adds weightp checkbox - Adds adaptive quantization slider going from 0 - 2.0 - Removes mixed-refs switch - Removes weightb switch - Removes no-fast-pskip switch - Removes spurious 0 value for reference frames, clamps values to 1-16 - Converts b-pyramid from a checkbox to a menu to allow strict, makes normal instead of off the default - Defaults b-pyramid to being on, removes it from string when it's on, and converts text values of strict or normal to a checked box since we're not offering strict. - Makes psy-rd slider go to 2.0 - Changes analyse some (default) to most, add new some (i4x4,i8x8) - Makes psy-trellis go in 0.05 increments instead of 0.1 increments. - Stops hiding 8x8dct when analyse is none (thanks, Rodeo) - Fixes animated reset of psy-rd and psy-trellis sliders when hidden (thanks, Rodeo) - Hides psy-trellis when cabac goes off (thanks, Rodeo) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3392 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/English.lproj/AdvancedView.xib | 1560 ++++++++++++++++----------------- macosx/HBAdvancedController.h | 12 +- macosx/HBAdvancedController.m | 416 +++++---- 3 files changed, 967 insertions(+), 1021 deletions(-) diff --git a/macosx/English.lproj/AdvancedView.xib b/macosx/English.lproj/AdvancedView.xib index 0d48266db..332713b10 100644 --- a/macosx/English.lproj/AdvancedView.xib +++ b/macosx/English.lproj/AdvancedView.xib @@ -2,10 +2,10 @@ 1050 - 10B504 + 10D573 732 - 1038.2 - 437.00 + 1038.29 + 460.00 com.apple.InterfaceBuilder.CocoaPlugin 732 @@ -43,21 +43,89 @@ 256 YES - + + + 268 + {{242, 278}, {61, 14}} + + YES + + 68288064 + 272630784 + Analysis + + LucidaGrande-Bold + 11 + 16 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 268 + {{-3, 278}, {66, 14}} + + YES + + 68288064 + 272630784 + Encoding + + + + + + + + + 268 + {{-3, 126}, {91, 14}} + + YES + + 68288064 + 272630784 + Psychovisual + + + + + + + 256 - {{150, 264}, {84, 15}} + {{120, 153}, {88, 15}} YES - + -2076049856 - 264192 + 264704 LucidaGrande 9 3614 - + 109199615 1 @@ -67,22 +135,177 @@ 400 75 - - + + Item1 1048576 2147483647 1 - + NSImage NSMenuCheckmark - + NSImage NSMenuMixedState _popUpItemAction: + + + YES + + + OtherViews + + + YES + + + + Item2 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Item3 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + 3 + YES + YES + 1 + + + + + 256 + {{277, 107}, {116, 14}} + + YES + + 67239424 + 71434240 + Adaptive Quantization: + + LucidaGrande + 10 + 2843 + + + + + + + + + 268 + {{398, 103}, {114, 16}} + + YES + + -2079981824 + 262144 + + + + 1 + 0.0 + 0.0 + 0.0 + 11 + 0 + YES + NO + + + + + 256 + {{14, 172}, {102, 14}} + + YES + + 67239424 + 71434240 + Weighted P-Frames: + + + + + + + + + 256 + {{118, 172}, {22, 16}} + + YES + + 67239424 + 131072 + + + LucidaGrande + 11 + 3100 + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + + 256 + {{120, 256}, {88, 15}} + + YES + + -2076049856 + 264192 + + + 109199615 + 1 + + + + + + 400 + 75 + + + Item1 + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: YES @@ -99,8 +322,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -110,8 +333,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -126,49 +349,29 @@ 256 - {{20, 265}, {128, 13}} + {{22, 256}, {94, 14}} YES 67239424 71434240 Reference Frames: - - LucidaGrande - 10 - 2843 - + - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - 3 - MAA - - + + 256 - {{94, 210}, {54, 17}} + {{11, 232}, {105, 17}} YES 67239424 71303168 - B-Frames: + Maximum B-Frames: @@ -178,7 +381,7 @@ 256 - {{48, 179}, {100, 26}} + {{293, 253}, {100, 17}} YES @@ -194,7 +397,7 @@ 256 - {{150, 213}, {84, 15}} + {{120, 235}, {88, 15}} YES @@ -218,8 +421,8 @@ 1048576 2147483647 1 - - + + _popUpItemAction: @@ -237,8 +440,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -248,8 +451,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -264,7 +467,7 @@ 256 - {{150, 191}, {84, 15}} + {{397, 256}, {117, 15}} YES @@ -274,7 +477,11 @@ 109199615 1 - + + LucidaGrande + 9 + 16 + @@ -288,8 +495,8 @@ 1048576 2147483647 1 - - + + _popUpItemAction: @@ -307,8 +514,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -318,8 +525,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -334,7 +541,7 @@ 256 - {{407, 243}, {83, 15}} + {{397, 194}, {117, 15}} YES @@ -344,7 +551,7 @@ 109199615 1 - + @@ -358,8 +565,8 @@ 1048576 2147483647 1 - - + + _popUpItemAction: @@ -377,8 +584,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -388,8 +595,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -404,7 +611,7 @@ 256 - {{426, 157}, {37, 17}} + {{568, 234}, {37, 17}} YES @@ -420,51 +627,33 @@ 256 - {{564, 243}, {96, 13}} + {{13, 101}, {103, 17}} YES 67239424 71303168 - No DCT-Decimate: + No DCT Decimation: - + 256 - {{578, 261}, {82, 17}} + {700, 34} YES - - 67239424 - 71303168 - No Fast-P-Skip: - - - - - - - - - 256 - {{23, 233}, {210, 5}} - - {0, 0} - - 67239424 - 0 - Box - - LucidaGrande - 13 - 1044 - - + + -1805517311 + 272760832 + + + + YES + 6 System textBackgroundColor @@ -473,56 +662,6 @@ MQA - - 3 - MCAwLjgwMDAwMDAxAA - - - 3 - 2 - 0 - NO - - - - 256 - {{263, 212}, {278, 5}} - - {0, 0} - - 67239424 - 0 - Box - - - - 3 - MCAwLjgwMDAwMDAxAA - - - 3 - 2 - 0 - NO - - - - 256 - {{20, 20}, {660, 44}} - - YES - - -1805517311 - 272760832 - - - LucidaGrande - 11 - 3100 - - - YES - 6 System @@ -531,26 +670,10 @@ - - - 256 - {{20, 244}, {128, 13}} - - YES - - 67239424 - 71303168 - Mixed References: - - - - - - 256 - {{407, 264}, {135, 15}} + {{397, 215}, {117, 15}} YES @@ -560,7 +683,7 @@ 109199615 1 - + @@ -574,8 +697,8 @@ 1048576 2147483647 1 - - + + _popUpItemAction: @@ -593,8 +716,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -604,8 +727,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -620,7 +743,7 @@ 256 - {{263, 265}, {142, 13}} + {{258, 212}, {135, 17}} YES @@ -636,7 +759,7 @@ 256 - {{263, 223}, {142, 13}} + {{264, 173}, {129, 14}} YES @@ -652,7 +775,7 @@ 256 - {{407, 222}, {83, 15}} + {{397, 173}, {117, 15}} YES @@ -662,7 +785,7 @@ 109199615 1 - + @@ -676,8 +799,8 @@ 1048576 2147483647 1 - - + + _popUpItemAction: @@ -695,8 +818,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -706,8 +829,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -722,39 +845,23 @@ 256 - {{263, 245}, {142, 13}} + {{242, 195}, {151, 14}} YES 67239424 71434240 - Subpixel Motion Estimation: + Subpixel ME & Mode Decision: - - - 256 - {{46, 144}, {102, 17}} - - YES - - 67239424 - 71303168 - Weighted B-Frames: - - - - - - 256 - {{43, 126}, {105, 14}} + {{11, 153}, {105, 14}} YES @@ -770,7 +877,7 @@ 256 - {{254, 127}, {151, 26}} + {{248, 86}, {145, 14}} YES @@ -786,13 +893,13 @@ 256 - {{60, 165}, {88, 17}} + {{281, 233}, {112, 17}} YES 67239424 71303168 - Direct Prediction: + Adaptive Direct Mode: @@ -802,7 +909,7 @@ 256 - {{150, 168}, {84, 15}} + {{397, 236}, {117, 15}} YES @@ -812,7 +919,7 @@ 109199615 1 - + @@ -826,8 +933,8 @@ 1048576 2147483647 1 - - + + _popUpItemAction: @@ -845,8 +952,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -856,8 +963,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -872,14 +979,14 @@ 256 - {{20, 67}, {231, 14}} + {{-3, 42}, {221, 17}} YES 67239424 272629760 Current x264 Advanced Option String: - + @@ -888,7 +995,7 @@ 256 - {{618, 217}, {63, 15}} + {{606, 107}, {96, 15}} YES @@ -912,8 +1019,8 @@ 1048576 2147483647 1 - - + + _popUpItemAction: @@ -931,8 +1038,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -942,8 +1049,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -958,7 +1065,7 @@ 256 - {{618, 193}, {63, 15}} + {{606, 88}, {96, 15}} YES @@ -982,8 +1089,8 @@ 1048576 2147483647 1 - - + + _popUpItemAction: @@ -1001,8 +1108,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -1012,125 +1119,39 @@ 1048576 2147483647 - - - _popUpItemAction: - - - - - 3 - YES - YES - 1 - - - - - 256 - {{554, 214}, {62, 17}} - - YES - - 67239424 - 71303168 - Deblocking: - - - - - - - - - 256 - {{148, 243}, {22, 16}} - - YES - - 67239424 - 131072 - - - - 1211912703 - 2 - - NSSwitch - - - - 200 - 25 - - - - - 256 - {{148, 147}, {22, 16}} - - YES - - 67239424 - 131072 - - - - 1211912703 - 2 - - - - 200 - 25 - - - - - 256 - {{148, 126}, {22, 16}} - - YES - - 67239424 - 131072 - - - - 1211912703 - 2 - - - - 200 - 25 + + + _popUpItemAction: + + + + + 3 + YES + YES + 1 - + 256 - {{660, 264}, {22, 16}} + {{543, 104}, {62, 17}} YES - + 67239424 - 131072 - - - - 1211912703 - 2 - - - - 200 - 25 + 71303168 + Deblocking: + + + + 256 - {{660, 242}, {22, 16}} + {{118, 102}, {22, 16}} YES @@ -1151,7 +1172,7 @@ 256 - {{463, 161}, {83, 15}} + {{606, 235}, {96, 15}} YES @@ -1175,8 +1196,8 @@ 1048576 2147483647 1 - - + + _popUpItemAction: @@ -1194,8 +1215,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -1205,8 +1226,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -1218,32 +1239,10 @@ 1 - - - 256 - {{263, 182}, {278, 5}} - - {0, 0} - - 67239424 - 0 - Box - - - - 3 - MCAwLjgwMDAwMDAxAA - - - 3 - 2 - 0 - NO - 256 - {{407, 192}, {63, 15}} + {{606, 254}, {96, 15}} YES @@ -1267,8 +1266,8 @@ 1048576 2147483647 1 - - + + _popUpItemAction: @@ -1286,8 +1285,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -1297,8 +1296,8 @@ 1048576 2147483647 - - + + _popUpItemAction: @@ -1313,13 +1312,13 @@ 256 - {{358, 192}, {47, 14}} + {{522, 254}, {83, 14}} YES 67239424 71434240 - Analysis: + Partition Types: @@ -1329,7 +1328,7 @@ 256 - {{525, 192}, {22, 16}} + {{118, 193}, {22, 16}} YES @@ -1350,13 +1349,13 @@ 256 - {{475, 193}, {50, 13}} + {{36, 193}, {80, 14}} YES 67239424 71434240 - 8x8 DCT: + 8x8 Transform: @@ -1366,7 +1365,7 @@ 256 - {{405, 160}, {22, 16}} + {{118, 214}, {22, 16}} YES @@ -1387,7 +1386,7 @@ 256 - {{286, 162}, {119, 13}} + {{-3, 215}, {119, 13}} YES @@ -1403,7 +1402,7 @@ 268 - {{408, 137}, {96, 16}} + {{398, 80}, {114, 16}} YES @@ -1425,13 +1424,13 @@ 256 - {{306, 115}, {99, 14}} + {{291, 65}, {102, 14}} YES 67239424 71434240 - Psychovisual Trellis + Psychovisual Trellis: @@ -1441,7 +1440,7 @@ 268 - {{408, 113}, {96, 16}} + {{398, 59}, {114, 16}} YES @@ -1594,14 +1593,6 @@ 202 - - - fX264optBPyramidSwitch - - - - 205 - fX264optBPyramidLabel @@ -1650,22 +1641,6 @@ 213 - - - fX264optMixedRefsSwitch - - - - 216 - - - - fX264optMixedRefsLabel - - - - 217 - fX264optMERangePopUp @@ -1698,22 +1673,6 @@ 221 - - - fX264optNfpskipLabel - - - - 222 - - - - fX264optNfpskipSwitch - - - - 223 - fX264optNodctdcmtLabel @@ -1778,22 +1737,6 @@ 231 - - - fX264optWeightBSwitch - - - - 232 - - - - fX264optWeightBLabel - - - - 234 - X264AdvancedOptionsChanged: @@ -1802,14 +1745,6 @@ 235 - - - X264AdvancedOptionsChanged: - - - - 236 - X264AdvancedOptionsChanged: @@ -1826,22 +1761,6 @@ 238 - - - X264AdvancedOptionsChanged: - - - - 239 - - - - X264AdvancedOptionsChanged: - - - - 242 - X264AdvancedOptionsChanged: @@ -1906,14 +1825,6 @@ 250 - - - X264AdvancedOptionsChanged: - - - - 251 - X264AdvancedOptionsChanged: @@ -2018,6 +1929,70 @@ 406 + + + X264AdvancedOptionsChanged: + + + + 411 + + + + fX264optWeightPLabel + + + + 413 + + + + fX264optWeightPSwitch + + + + 414 + + + + X264AdvancedOptionsChanged: + + + + 424 + + + + fX264optAqSlider + + + + 425 + + + + fX264optAqLabel + + + + 426 + + + + X264AdvancedOptionsChanged: + + + + 433 + + + + fX264optBPyramidPopUp + + + + 434 + @@ -2056,45 +2031,43 @@ - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - + - - - + + - + + + + + + + + + + + + + + + + + + + x264 @@ -2162,51 +2135,6 @@ - - 25 - - - YES - - - - - - 26 - - - YES - - - 256 - {{2, 2}, {125, 1}} - - - - - - 27 - - - - - 28 - - - YES - - - 256 - {{2, 2}, {125, 1}} - - - - - - 29 - - - 30 @@ -2216,15 +2144,6 @@ - - 31 - - - YES - - - - 32 @@ -2262,119 +2181,65 @@ - 44 - - - YES - - - - - - 45 - - - YES - - - - - - 46 - - - YES - - - - - - 49 - - - YES - - - - - - 50 - - - YES - - - - - - 55 - - - YES - - - - - - 56 - + 44 + YES - + - 61 - + 46 + YES - + - 66 - + 49 + YES - + - 67 - + 50 + YES - + - 68 - + 56 + YES - + - 71 - + 61 + YES - + - 72 - + 66 + YES - + @@ -2396,24 +2261,6 @@ - - 79 - - - YES - - - 256 - {{2, 2}, {125, 1}} - - - - - - 80 - - - 81 @@ -2534,21 +2381,11 @@ - - 349 - - - 350 - - 351 - - - 352 @@ -2582,11 +2419,6 @@ - - 357 - - - 358 @@ -2606,11 +2438,6 @@ - - 363 - - - 364 @@ -2634,26 +2461,6 @@ - - 367 - - - - - 368 - - - - - 371 - - - - - 372 - - - 373 @@ -3081,6 +2888,162 @@ + + 407 + + + YES + + + + + + 408 + + + YES + + + + + + 409 + + + + + 410 + + + + + 420 + + + YES + + + + + + 421 + + + YES + + + + + + 422 + + + + + 423 + + + + + 55 + + + YES + + + + + + 363 + + + + + 427 + + + YES + + + + + + 428 + + + YES + + + + + + 429 + + + YES + + + + + + + + 430 + + + + + 431 + + + + + 432 + + + + + 438 + + + YES + + + + + + 439 + + + + + 440 + + + YES + + + + + + 441 + + + + + 442 + + + YES + + + + + + 443 + + + @@ -3125,27 +3088,14 @@ 24.IBAttributePlaceholdersKey 24.IBPluginDependency 24.ImportedFromIB2 - 25.IBAttributePlaceholdersKey - 25.IBPluginDependency - 25.ImportedFromIB2 + 254.IBEditorWindowLastContentRect 254.IBPluginDependency 254.ImportedFromIB2 254.editorWindowContentRectSynchronizationRect 255.IBPluginDependency 255.ImportedFromIB2 - 26.IBPluginDependency - 26.ImportedFromIB2 - 27.IBPluginDependency - 27.ImportedFromIB2 - 28.IBPluginDependency - 28.ImportedFromIB2 - 29.IBPluginDependency - 29.ImportedFromIB2 30.IBPluginDependency 30.ImportedFromIB2 - 31.IBAttributePlaceholdersKey - 31.IBPluginDependency - 31.ImportedFromIB2 32.IBAttributePlaceholdersKey 32.IBPluginDependency 32.ImportedFromIB2 @@ -3160,17 +3110,14 @@ 346.IBPluginDependency 347.IBPluginDependency 348.IBPluginDependency - 349.IBPluginDependency 35.IBPluginDependency 35.ImportedFromIB2 350.IBPluginDependency - 351.IBPluginDependency 352.IBPluginDependency 353.IBPluginDependency 354.IBPluginDependency 355.IBPluginDependency 356.IBPluginDependency - 357.IBPluginDependency 358.IBPluginDependency 36.IBPluginDependency 36.ImportedFromIB2 @@ -3180,13 +3127,9 @@ 364.IBPluginDependency 365.IBPluginDependency 366.IBPluginDependency - 367.IBPluginDependency - 368.IBPluginDependency 37.IBAttributePlaceholdersKey 37.IBPluginDependency 37.ImportedFromIB2 - 371.IBPluginDependency - 372.IBPluginDependency 373.IBPluginDependency 374.IBPluginDependency 375.IBPluginDependency @@ -3232,18 +3175,47 @@ 402.ImportedFromIB2 403.IBPluginDependency 403.ImportedFromIB2 + 407.IBAttributePlaceholdersKey + 407.IBPluginDependency + 407.ImportedFromIB2 + 408.IBAttributePlaceholdersKey + 408.IBPluginDependency + 408.ImportedFromIB2 + 409.IBPluginDependency 41.IBPluginDependency 41.ImportedFromIB2 + 410.IBPluginDependency 42.IBPluginDependency 42.ImportedFromIB2 + 420.IBPluginDependency + 421.IBAttributePlaceholdersKey + 421.IBPluginDependency + 421.ImportedFromIB2 + 422.IBPluginDependency + 423.IBPluginDependency + 427.IBAttributePlaceholdersKey + 427.IBPluginDependency + 427.ImportedFromIB2 + 428.IBPluginDependency + 429.IBPluginDependency + 429.ImportedFromIB2 43.IBPluginDependency 43.ImportedFromIB2 + 430.IBPluginDependency + 430.ImportedFromIB2 + 431.IBPluginDependency + 431.ImportedFromIB2 + 432.IBPluginDependency + 432.ImportedFromIB2 + 438.IBPluginDependency + 439.IBPluginDependency 44.IBAttributePlaceholdersKey 44.IBPluginDependency 44.ImportedFromIB2 - 45.IBAttributePlaceholdersKey - 45.IBPluginDependency - 45.ImportedFromIB2 + 440.IBPluginDependency + 441.IBPluginDependency + 442.IBPluginDependency + 443.IBPluginDependency 46.IBAttributePlaceholdersKey 46.IBPluginDependency 46.ImportedFromIB2 @@ -3295,20 +3267,8 @@ 66.IBAttributePlaceholdersKey 66.IBPluginDependency 66.ImportedFromIB2 - 67.IBAttributePlaceholdersKey - 67.IBPluginDependency - 67.ImportedFromIB2 - 68.IBAttributePlaceholdersKey - 68.IBPluginDependency - 68.ImportedFromIB2 7.IBPluginDependency 7.ImportedFromIB2 - 71.IBAttributePlaceholdersKey - 71.IBPluginDependency - 71.ImportedFromIB2 - 72.IBAttributePlaceholdersKey - 72.IBPluginDependency - 72.ImportedFromIB2 73.IBAttributePlaceholdersKey 73.IBPluginDependency 73.ImportedFromIB2 @@ -3323,12 +3283,8 @@ 77.ImportedFromIB2 78.IBPluginDependency 78.ImportedFromIB2 - 79.IBPluginDependency - 79.ImportedFromIB2 8.IBPluginDependency 8.ImportedFromIB2 - 80.IBPluginDependency - 80.ImportedFromIB2 81.IBAttributePlaceholdersKey 81.IBPluginDependency 81.ImportedFromIB2 @@ -3434,15 +3390,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - - YES - - - YES - - - com.apple.InterfaceBuilder.CocoaPlugin - + {{0, 735}, {700, 290}} com.apple.InterfaceBuilder.CocoaPlugin {{42, 754}, {700, 290}} @@ -3450,23 +3398,6 @@ com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - - YES - - - com.apple.InterfaceBuilder.CocoaPlugin - YES @@ -3488,7 +3419,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3498,8 +3428,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3507,8 +3435,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin YES @@ -3525,8 +3451,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin YES @@ -3601,12 +3525,6 @@ com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - YES @@ -3625,15 +3543,13 @@ com.apple.InterfaceBuilder.CocoaPlugin - - YES - - - YES - - + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin YES @@ -3643,10 +3559,8 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{-21, 171}, {700, 290}} com.apple.InterfaceBuilder.CocoaPlugin - - {{692, 501}, {700, 290}} + com.apple.InterfaceBuilder.CocoaPlugin YES @@ -3657,6 +3571,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3666,6 +3581,8 @@ com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin YES @@ -3676,9 +3593,16 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + YES + + + YES + + com.apple.InterfaceBuilder.CocoaPlugin @@ -3690,8 +3614,10 @@ com.apple.InterfaceBuilder.CocoaPlugin + {{113, 127}, {700, 290}} com.apple.InterfaceBuilder.CocoaPlugin + {{692, 501}, {700, 290}} YES @@ -3709,6 +3635,8 @@ com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + YES @@ -3718,6 +3646,12 @@ com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + YES @@ -3727,6 +3661,8 @@ com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + YES @@ -3738,14 +3674,10 @@ com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - B-frame pyramids are a High Profile feature. This means that if you enable it, YOUR VIDEO WILL NOT PLAY IN QUICKTIME. Pyramidal B-frames mean that B-frames don't just reference surrounding reference frames — instead, it also treats a previous B-frame as a reference, improving quality/lowering bitrate at the expense of complexity. Logically, to reference an earlier B-frame, you must tell x264 to use at least 2 B-frames. - - + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -3757,6 +3689,8 @@ com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + YES @@ -3785,10 +3719,6 @@ com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - YES @@ -3871,7 +3801,7 @@ - 406 + 449 @@ -3918,10 +3848,12 @@ fX264optAlphaDeblockPopUp fX264optAnalyseLabel fX264optAnalysePopUp + fX264optAqLabel + fX264optAqSlider fX264optBAdaptLabel fX264optBAdaptPopUp fX264optBPyramidLabel - fX264optBPyramidSwitch + fX264optBPyramidPopUp fX264optBetaDeblockPopUp fX264optBframesLabel fX264optBframesPopUp @@ -3932,12 +3864,8 @@ fX264optDirectPredPopUp fX264optMERangeLabel fX264optMERangePopUp - fX264optMixedRefsLabel - fX264optMixedRefsSwitch fX264optMotionEstLabel fX264optMotionEstPopUp - fX264optNfpskipLabel - fX264optNfpskipSwitch fX264optNodctdcmtLabel fX264optNodctdcmtSwitch fX264optPsyRDLabel @@ -3952,8 +3880,8 @@ fX264optTrellisPopUp fX264optView fX264optViewTitleLabel - fX264optWeightBLabel - fX264optWeightBSwitch + fX264optWeightPLabel + fX264optWeightPSwitch YES @@ -3966,9 +3894,11 @@ NSTextField NSPopUpButton NSTextField + NSSlider + NSTextField NSPopUpButton NSTextField - NSButton + NSPopUpButton NSPopUpButton NSTextField NSPopUpButton @@ -3980,14 +3910,10 @@ NSTextField NSPopUpButton NSTextField - NSButton - NSTextField NSPopUpButton NSTextField NSButton NSTextField - NSButton - NSTextField NSSlider NSTextField NSSlider @@ -4037,21 +3963,21 @@ NSApplication NSResponder - + IBFrameworkSource AppKit.framework/Headers/NSApplication.h NSApplication - + IBFrameworkSource AppKit.framework/Headers/NSApplicationScripting.h NSApplication - + IBFrameworkSource AppKit.framework/Headers/NSColorPanel.h @@ -4077,14 +4003,6 @@ AppKit.framework/Headers/NSUserInterfaceItemSearching.h - - NSBox - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSBox.h - - NSButton NSControl @@ -4112,7 +4030,7 @@ NSControl NSView - + IBFrameworkSource AppKit.framework/Headers/NSControl.h @@ -4128,7 +4046,7 @@ NSMenu NSObject - + IBFrameworkSource AppKit.framework/Headers/NSMenu.h @@ -4136,7 +4054,7 @@ NSMenuItem NSObject - + IBFrameworkSource AppKit.framework/Headers/NSMenuItem.h @@ -4158,19 +4076,19 @@ NSObject - + NSObject - + NSObject - + NSObject - + NSObject @@ -4209,7 +4127,7 @@ NSObject - + NSObject @@ -4255,7 +4173,7 @@ NSObject - + IBFrameworkSource AppKit.framework/Headers/NSView.h @@ -4598,7 +4516,7 @@ NSView - + NSView @@ -4610,7 +4528,7 @@ NSView NSResponder - + diff --git a/macosx/HBAdvancedController.h b/macosx/HBAdvancedController.h index a58b2f886..bc6e5b808 100644 --- a/macosx/HBAdvancedController.h +++ b/macosx/HBAdvancedController.h @@ -20,24 +20,20 @@ IBOutlet NSPopUpButton * fX264optBframesPopUp; IBOutlet NSTextField * fX264optRefLabel; IBOutlet NSPopUpButton * fX264optRefPopUp; - IBOutlet NSTextField * fX264optNfpskipLabel; - IBOutlet NSButton * fX264optNfpskipSwitch; + IBOutlet NSButton * fX264optWeightPSwitch; + IBOutlet NSTextField * fX264optWeightPLabel; IBOutlet NSTextField * fX264optNodctdcmtLabel; IBOutlet NSButton * fX264optNodctdcmtSwitch; IBOutlet NSTextField * fX264optSubmeLabel; IBOutlet NSPopUpButton * fX264optSubmePopUp; IBOutlet NSTextField * fX264optTrellisLabel; IBOutlet NSPopUpButton * fX264optTrellisPopUp; - IBOutlet NSTextField * fX264optMixedRefsLabel; - IBOutlet NSButton * fX264optMixedRefsSwitch; IBOutlet NSTextField * fX264optMotionEstLabel; IBOutlet NSPopUpButton * fX264optMotionEstPopUp; IBOutlet NSTextField * fX264optMERangeLabel; IBOutlet NSPopUpButton * fX264optMERangePopUp; - IBOutlet NSTextField * fX264optWeightBLabel; - IBOutlet NSButton * fX264optWeightBSwitch; IBOutlet NSTextField * fX264optBPyramidLabel; - IBOutlet NSButton * fX264optBPyramidSwitch; + IBOutlet NSPopUpButton * fX264optBPyramidPopUp; IBOutlet NSTextField * fX264optDirectPredLabel; IBOutlet NSPopUpButton * fX264optDirectPredPopUp; IBOutlet NSTextField * fX264optDeblockLabel; @@ -49,6 +45,8 @@ IBOutlet NSButton * fX264opt8x8dctSwitch; IBOutlet NSTextField * fX264optCabacLabel; IBOutlet NSButton * fX264optCabacSwitch; + IBOutlet NSSlider * fX264optAqSlider; + IBOutlet NSTextField * fX264optAqLabel; IBOutlet NSSlider * fX264optPsyRDSlider; IBOutlet NSTextField * fX264optPsyRDLabel; IBOutlet NSSlider * fX264optPsyTrellisSlider; diff --git a/macosx/HBAdvancedController.m b/macosx/HBAdvancedController.m index a53adef58..6ce8ddcb1 100644 --- a/macosx/HBAdvancedController.m +++ b/macosx/HBAdvancedController.m @@ -64,11 +64,11 @@ unsigned i; NSControl * controls[] = { fX264optViewTitleLabel,fDisplayX264Options,fDisplayX264OptionsLabel,fX264optBframesLabel, - fX264optBframesPopUp,fX264optRefLabel,fX264optRefPopUp,fX264optNfpskipLabel,fX264optNfpskipSwitch, + fX264optBframesPopUp,fX264optRefLabel,fX264optRefPopUp, fX264optNodctdcmtLabel,fX264optNodctdcmtSwitch,fX264optSubmeLabel,fX264optSubmePopUp, - fX264optTrellisLabel,fX264optTrellisPopUp,fX264optMixedRefsLabel,fX264optMixedRefsSwitch, + fX264optTrellisLabel,fX264optTrellisPopUp, fX264optWeightPLabel, fX264optWeightPSwitch, fX264optMotionEstLabel,fX264optMotionEstPopUp,fX264optMERangeLabel,fX264optMERangePopUp, - fX264optWeightBLabel,fX264optWeightBSwitch, fX264optBPyramidLabel,fX264optBPyramidSwitch, + fX264optBPyramidLabel,fX264optBPyramidPopUp, fX264optAqLabel, fX264optAqSlider, fX264optDirectPredLabel,fX264optDirectPredPopUp,fX264optDeblockLabel,fX264optAnalyseLabel, fX264optAnalysePopUp,fX264opt8x8dctLabel,fX264opt8x8dctSwitch,fX264optCabacLabel,fX264optCabacSwitch, fX264optAlphaDeblockPopUp,fX264optBetaDeblockPopUp, fX264optPsyRDSlider, fX264optPsyRDLabel, fX264optPsyTrellisSlider, fX264optPsyTrellisLabel, fX264optBAdaptPopUp, fX264optBAdaptLabel }; @@ -115,69 +115,67 @@ [fX264optBframesPopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]]; } toolTip = - @"Sane values are 1-6. B-Frames are smaller than other frames, so they let you pack in more quality at the same bitrate. Use more of them with animated material."; + @"Sane values are ~2-5. This specifies the maximum number of sequential B-frames that the encoder can use. Large numbers generally won't help significantly unless Adaptive B-frames is set to Optimal. Cel-animated source material and B-pyramid also significantly increase the usefulness of larger values. Baseline profile, as required for iPods and similar devices, requires B-frames to be set to 0 (off)."; [fX264optBframesPopUp setToolTip: toolTip]; [fX264optBframesLabel setToolTip: toolTip]; /*Reference Frames fX264optRefPopUp*/ [fX264optRefPopUp removeAllItems]; [fX264optRefPopUp addItemWithTitle:@"Default (3)"]; - for (i=0; i<17;i++) + for (i=1; i<17;i++) { [fX264optRefPopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]]; } toolTip = - @"Sane values are 1-6. The more you add, the higher the quality — but the slower the encode. Be careful...too many and QuickTime struggle to play the video back."; + @"Sane values are ~1-6. The more you add, the better the compression, but the slower the encode. Cel animation tends to benefit from more reference frames a lot more than film content. Note that many hardware devices have limitations on the number of supported reference frames, so if you're encoding for a handheld or standalone player, don't touch this unless you're absolutely sure you know what you're doing!"; [fX264optRefPopUp setToolTip: toolTip]; [fX264optRefLabel setToolTip: toolTip]; - - /*No Fast P-Skip fX264optNfpskipSwitch BOOLEAN*/ - [fX264optNfpskipSwitch setState:0]; - toolTip = - @"This can help with blocking on solid colors like blue skies, but it also slows down the encode."; - [fX264optNfpskipSwitch setToolTip: toolTip]; - [fX264optNfpskipLabel setToolTip: toolTip]; + + /*Weight-P fX264optWeightPSwitch BOOLEAN*/ + [fX264optWeightPSwitch setState:1]; + toolTip = + @"Performs extra analysis to decide upon weighting parameters for each frame. This improves overall compression slightly and improves the quality of fades greatly. Baseline profile, as required for iPods and similar devices, requires weighted P-frame prediction to be disabled. Note that some devices and players, even those that support Main Profile, may have problems with Weighted P-frame prediction: the Apple TV is completely incompatible with it, for example."; + [fX264optWeightPSwitch setToolTip: toolTip]; + [fX264optWeightPLabel setToolTip: toolTip]; /*No Dict Decimate fX264optNodctdcmtSwitch BOOLEAN*/ [fX264optNodctdcmtSwitch setState:0]; toolTip = - @"To save space, x264 will \"zero out\" blocks when it thinks they won't be perceptible by the viewer. This negligibly reduces quality, but in rare cases it can mess up and produce visible artifacts. This situation can be alleviated by telling x264 not to decimate DCT blocks.\n\nIt increases quality but also bitrate/file size, so if you use it when you've specified a target bitrate you will end up with a worse picture than without it. However, when used with constant quality encoding, or if you boost the average bitrate to compensate, you might get a better result."; + @"x264 normally zeroes out nearly-empty data blocks to save bits to be better used for some other purpose in the video. However, this can sometimes have slight negative effects on retention of subtle grain and dither. Don't touch this unless you're having banding issues or other such cases where you are having trouble keeping fine noise."; [fX264optNodctdcmtSwitch setToolTip: toolTip]; [fX264optNodctdcmtLabel setToolTip: toolTip]; /*Sub Me fX264optSubmePopUp*/ [fX264optSubmePopUp removeAllItems]; [fX264optSubmePopUp addItemWithTitle:@"Default (7)"]; - for (i=0; i<11;i++) - { - [fX264optSubmePopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]]; - } + [fX264optSubmePopUp addItemWithTitle:[NSString stringWithFormat:@"0: SAD, no subpel (super fast!)"]]; + [fX264optSubmePopUp addItemWithTitle:[NSString stringWithFormat:@"1: SAD, qpel"]]; + [fX264optSubmePopUp addItemWithTitle:[NSString stringWithFormat:@"2: SATD, qpel"]]; + [fX264optSubmePopUp addItemWithTitle:[NSString stringWithFormat:@"3: SATD, multi-qpel"]]; + [fX264optSubmePopUp addItemWithTitle:[NSString stringWithFormat:@"4: SATD, qpel on all"]]; + [fX264optSubmePopUp addItemWithTitle:[NSString stringWithFormat:@"5: SATD, multi-qpel on all"]]; + [fX264optSubmePopUp addItemWithTitle:[NSString stringWithFormat:@"6: RD in I/P-frames"]]; + [fX264optSubmePopUp addItemWithTitle:[NSString stringWithFormat:@"7: RD in all frames"]]; + [fX264optSubmePopUp addItemWithTitle:[NSString stringWithFormat:@"8: RD refine in I/P-frames"]]; + [fX264optSubmePopUp addItemWithTitle:[NSString stringWithFormat:@"9: RD refine in all frames"]]; + [fX264optSubmePopUp addItemWithTitle:[NSString stringWithFormat:@"10: QPRD in all frames"]]; toolTip = - @"This setting is finer-grained than the motion estimation settings above. Instead of dealing with whole pixels, it deals with 4 fractional pixels, or quarter pixels (qpel). Higher levels increase quality by further refining the motion prediction for these quarter pixels, but take longer to encode.\n\nLevel 6, turns on a feature called rate distortion optimization, including psychovisual enhancements. 7, the default, enables that rate distortion for B-frames. 8 refines those decisions for I and P frames, and 9 adds on refinement for B-frames as well."; + @"This setting controls both subpixel-precision motion estimation and mode decision methods.\n\nSubpixel motion estimation is used for refining motion estimates beyond mere pixel accuracy, improving compression.\n\nMode decision is the method used to choose how to encode each block of the frame: a very important decision.\n\nSAD is the fastest method, followed by SATD, RD, RD refinement, and the slowest, QPRD.\n\n6 or higher is strongly recommended: Psy-RD, a very powerful psy optimization that helps retain detail, requires RD.\n\n10, the most powerful and slowest option, requires trellis=2."; [fX264optSubmePopUp setToolTip: toolTip]; [fX264optSubmeLabel setToolTip: toolTip]; /*Trellis fX264optTrellisPopUp*/ [fX264optTrellisPopUp removeAllItems]; - [fX264optTrellisPopUp addItemWithTitle:@"Default (1)"]; - for (i=0; i<3;i++) - { - [fX264optTrellisPopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]]; - } + [fX264optTrellisPopUp addItemWithTitle:@"Default (Encode only)"]; + [fX264optTrellisPopUp addItemWithTitle:[NSString stringWithFormat:@"Off"]]; + [fX264optTrellisPopUp addItemWithTitle:[NSString stringWithFormat:@"Encode only"]]; + [fX264optTrellisPopUp addItemWithTitle:[NSString stringWithFormat:@"Always"]]; [fX264optTrellisPopUp setWantsLayer:YES]; toolTip = - @"Trellis fine-tunes how bitrate is doled out, so it can reduce file size/bitrate or increase quality. A value of 1 means it only fine-tunes the final encode of a block of pixels, while 2 means it is considered during earlier phases of the decision-making process as well."; + @"Trellis fine-tunes the rounding of transform coefficients to squeeze out 3-5% more compression at the cost of some speed. \"Always\" uses trellis not only during the main encoding process, but also during analysis, which improves compression even more, albeit at great speed cost. Trellis costs more speed at higher bitrates and requires CABAC."; [fX264optTrellisPopUp setToolTip: toolTip]; [fX264optTrellisLabel setToolTip: toolTip]; - /*Mixed-references fX264optMixedRefsSwitch BOOLEAN*/ - [fX264optMixedRefsSwitch setState:1]; - [fX264optMixedRefsSwitch setWantsLayer:YES]; - toolTip = - @"With this on, different references can be used for different parts of each 16x16 pixel macroblock, increasing quality."; - [fX264optMixedRefsSwitch setToolTip: toolTip]; - [fX264optMixedRefsLabel setToolTip: toolTip]; - /*Motion Estimation fX264optMotionEstPopUp*/ [fX264optMotionEstPopUp removeAllItems]; [fX264optMotionEstPopUp addItemWithTitle:@"Default (Hexagon)"]; @@ -187,7 +185,7 @@ [fX264optMotionEstPopUp addItemWithTitle:@"Exhaustive"]; [fX264optMotionEstPopUp addItemWithTitle:@"Transformed Exhaustive"]; toolTip = - @"Controls the motion estimation method. Motion estimation is how the encoder decides how each block of pixels in a frame has moved, compared to most similar blocks in the other frames it references. There are many ways of finding the most similar blocks, with varying speeds and accuracy.\n\nAt the most basic setting, dia, x264 will only consider a diamond-shaped region around each pixel.\n\nThe default setting, hex, is similar to dia but uses a hexagon shape.\n\nUneven multi-hexagon, umh, searches a number of different patterns across a wider area and thus is slower than hex and dia but further increases compression efficiency and quality.\n\nesa, an exhaustive search of a square around each pixel (whose size is controlled by the me-range parameter), is much slower and offers only minimal quality gains.\n\ntesa, transformed exhaustive search, which performs just as thorough a search, is slower still but offers further slight improvements to quality."; + @"Controls the motion estimation method. Motion estimation is how the encoder estimates how each block of pixels in a frame has moved. A better motion search method improves compression at the cost of speed.\n\nDiamond: performs an extremely fast and simple search using a diamond pattern.\n\nHexagon: performs a somewhat more effective but slightly slower search using a hexagon pattern.\n\nUneven Multi-Hex: performs a very wide search using a variety of patterns, more accurately capturing complex motion.\n\nExhaustive: performs a \"dumb\" search of every pixel in a wide area. Significantly slower for only a small compression gain.\n\nTransformed Exhaustive: Like exhaustive, but makes even more accurate decisions. Accordingly, somewhat slower, also for only a small improvement."; [fX264optMotionEstPopUp setToolTip: toolTip]; [fX264optMotionEstLabel setToolTip: toolTip]; @@ -199,24 +197,19 @@ [fX264optMERangePopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]]; } toolTip = - @"This range is the radius, in pixels, x264 should use for motion estimation searches. It only has an effect when you use Uneven Multi-Hexagonal, Exhaustive, or Transformed Exhaustive searching. 24, 32, and 64 are good values, with each being progressively smaller for progressively less improvement to picture quality."; + @"This is the distance x264 searches from its best guess at the motion of a block in order to try to find its actual motion. Doesn't apply to Diamond or Hexagon search options. The default is fine for most content, but extremely high motion video, especially at HD resolutions, may benefit from higher ranges, albeit at a high speed cost."; [fX264optMERangePopUp setToolTip: toolTip]; [fX264optMERangeLabel setToolTip: toolTip]; - /*Weighted B-Frame Prediction fX264optWeightBSwitch BOOLEAN*/ - [fX264optWeightBSwitch setState:1]; - [fX264optWeightBSwitch setWantsLayer:YES]; - toolTip = - @"Sometimes x264 will base a B-frame's motion compensation on frames both before and after. With weighted B-frames, the amount of influence each frame has is related to its distance from the frame being encoded, instead of both having equal influence. The AppleTV can have issues with this."; - [fX264optWeightBSwitch setToolTip: toolTip]; - [fX264optWeightBLabel setToolTip: toolTip]; - - /*B-frame Pyramids fX264optBPyramidSwitch BOOLEAN*/ - [fX264optBPyramidSwitch setState:0]; - [fX264optBPyramidSwitch setWantsLayer:YES]; + /*B-frame Pyramids fX264optBPyramidPopUp*/ + [fX264optBPyramidPopUp removeAllItems]; + [fX264optBPyramidPopUp addItemWithTitle:@"Default (Normal)"]; + [fX264optBPyramidPopUp addItemWithTitle:@"Off"]; + [fX264optBPyramidPopUp addItemWithTitle:@"Strict"]; + [fX264optBPyramidPopUp setWantsLayer:YES]; toolTip = - @"B-frame pyramids are a High Profile feature. Pyramidal B-frames mean that B-frames don't just reference surrounding reference frames — instead, it also treats a previous B-frame as a reference, improving quality/lowering bitrate at the expense of complexity. Logically, to reference an earlier B-frame, you must tell x264 to use at least 2 B-frames."; - [fX264optBPyramidSwitch setToolTip: toolTip]; + @"B-pyramid improves compression by creating a pyramidal structure (hence the name) of B-frames, allowing B-frames to reference each other to improve compression. Requires Max B-frames greater than 1; optimal adaptive B-frames is strongly recommended for full compression benefit."; + [fX264optBPyramidPopUp setToolTip: toolTip]; [fX264optBPyramidLabel setToolTip: toolTip]; /*Direct B-Frame Prediction Mode fX264optDirectPredPopUp*/ @@ -228,7 +221,7 @@ [fX264optDirectPredPopUp addItemWithTitle:@"Automatic"]; [fX264optDirectPredPopUp setWantsLayer:YES]; toolTip = - @"Direct prediction tells x264 what method to use when guessing motion for certain parts of a B-frame. It can either look at other parts of the current frame (spatial) or compare against the following P-frameframe (temporal). You're best off setting this to automatic, so x264 decides which method is best on its own. Don't select none assuming it will be faster; instead it will take longer and look worse. If you're going to choose between spatial and temporal, spatial is usually better."; + @"H.264 allows for two different prediction modes, spatial and temporal, in B-frames.\n\nSpatial, the default, is almost always better, but temporal is sometimes useful too.\n\nx264 can, at the cost of a small amount of speed (and accordingly for a small compression gain), adaptively select which is better for each particular frame."; [fX264optDirectPredPopUp setToolTip: toolTip]; [fX264optDirectPredLabel setToolTip: toolTip]; @@ -240,7 +233,7 @@ [fX264optBAdaptPopUp addItemWithTitle:@"Optimal"]; [fX264optBAdaptPopUp setWantsLayer:YES]; toolTip = - @"When adaptive B-Frames are disabled, the number of B-Frames you specify is the constant length of every B-Frame sequence. When one of the adaptive modes is enabled, the number of B-Frames is treated as a maximum, with the length of each sequence varying, but never exceeding the max.\n\nFast mode takes the same amount of time no matter how many B-frames you specify. However, it doesn't always make the best decisions on how many B-Frames to use in a sequence.\n\nOptimal mode gets slower as the maximum number of B-Frames increases, but does a much better job at deciding sequence length, which can mean smaller file sizes and better quality."; + @"x264 has a variety of algorithms to decide when to use B-frames and how many to use.\n\nFast mode takes roughly the same amount of time no matter how many B-frames you specify. However, while fast, its decisions are often suboptimal.\n\nOptimal mode gets slower as the maximum number of B-Frames increases, but makes much more accurate decisions, especially when used with B-pyramid."; [fX264optBAdaptPopUp setToolTip: toolTip]; [fX264optBAdaptLabel setToolTip: toolTip]; @@ -252,7 +245,7 @@ [fX264optAlphaDeblockPopUp addItemWithTitle:[NSString stringWithFormat:@"%d",i]]; } toolTip = - @"x264 includes an in-loop deblocking filter. What this means is that blocky compression artifacts are smoothed away when you play back the video. It has two settings: strength and threshold, just like a simple filter in Photoshop.\n\nStrength controls the amount of deblocking applied to the whole frame. If you drop down below 0, you reduce the amount of blurring. Go too negative, and you'll get an effect somewhat like oversharpening an image. Go into positive values, and the image may become too soft.\n\nThreshold controls how sensitive the filter is to whether something in a block is detail that needs to be preserved: lower numbers blur details less.\n\nThe default deblocking values are 0 and 0. This does not mean zero deblocking. It means x264 will apply the regular deblocking strength and thresholds the codec authors have selected as working the best in most cases.\n\nWhile many, many people stick with the default deblocking values of 0,0, and you should never change the deblocking without disabling adaptive quantization, other people disagree. Some prefer a slightly less blurred image for live action material, and use values like -2,-1 or -2,-2. Others will raise it to 1,1 or even 3,3 for animation. While the values for each setting extend from -6 to 6, the consensus is that going below -3 or above 3 is worthless."; + @"H.264 has a built-in deblocking filter that smooths out blocking artifacts after decoding each frame. This not only improves visual quality, but also helps compression significantly. The deblocking filter takes a lot of CPU power, so if you're looking to minimize CPU requirements for video playback, disable it.\n\nThe deblocking filter has two adjustable parameters, \"strength\" and \"threshold\". The former controls how strong (or weak) the deblocker is, while the latter controls how many (or few) edges it applies to. Lower values mean less deblocking, higher values mean more deblocking. The default is 0 (normal strength) for both parameters."; [fX264optAlphaDeblockPopUp setToolTip: toolTip]; [fX264optDeblockLabel setToolTip: toolTip]; @@ -268,11 +261,12 @@ /* Analysis fX264optAnalysePopUp */ [fX264optAnalysePopUp removeAllItems]; - [fX264optAnalysePopUp addItemWithTitle:@"Default (some)"]; /* 0=default */ + [fX264optAnalysePopUp addItemWithTitle:@"Default (Most)"]; /* 0=default */ [fX264optAnalysePopUp addItemWithTitle:[NSString stringWithFormat:@"None"]]; /* 1=none */ - [fX264optAnalysePopUp addItemWithTitle:[NSString stringWithFormat:@"All"]]; /* 2=all */ + [fX264optAnalysePopUp addItemWithTitle:[NSString stringWithFormat:@"Some"]]; /* 2=some */ + [fX264optAnalysePopUp addItemWithTitle:[NSString stringWithFormat:@"All"]]; /* 3=all */ toolTip = - @"Analysis controls how finely x264 divides up a frame to capture detail. Full macroblocks are 16x16 pixels, but x264 can go down all the way to 4x4 blocks if it judges it necessary. By default it only breaks up key frames that much. To give x264 the freedom to make the best decisions for all frames, use \"all\" analysis. If you want to create a high profile H.264 video (which is less compatible with the world at large than main profile), also check the \"8x8 DCT blocks\" box to add yet another block size for analysis."; + @"Mode decision picks from a variety of options to make its decision: this option chooses what options those are. Fewer partitions to check means faster encoding, at the cost of worse decisions, since the best option might have been one that was turned off."; [fX264optAnalysePopUp setToolTip: toolTip]; [fX264optAnalyseLabel setToolTip: toolTip]; @@ -280,26 +274,38 @@ [fX264opt8x8dctSwitch setState:1]; [fX264opt8x8dctSwitch setWantsLayer:YES]; toolTip = - @"Checking this box lets x264 break key frames down into 8x8 blocks of pixels for analysis. This is a high profile feature of H.264, which makes it less compatible. It should slightly decrease bitrate or improve quality. Turn it on whenever possible."; + @"The 8x8 transform is the single most useful feature of x264 in terms of compression-per-speed. It improves compression by at least 5% at a very small speed cost and may provide an unusually high visual quality benefit compared to its compression gain. However, it requires High Profile, which many devices may not support."; [fX264opt8x8dctSwitch setToolTip: toolTip]; [fX264opt8x8dctLabel setToolTip: toolTip]; /* CABAC fX264opCabacSwitch */ [fX264optCabacSwitch setState:1]; toolTip = - @"CABAC, or context adaptive binary arithmetic coding, is used by x264 to reduce the bitrate needed for a given quality by 15\%. This makes it very cool and very useful, and it should be left on whenever possible. However, it is incompatible with the iPod, and makes the AppleTV struggle. So turn it off for those.\n\nCABAC is a kind of entropy coding, which means that it compresses data by making shorthand symbols to represent long streams of data. The \"entropy\" part means that the symbols it uses the most often are the smallest. When you disable CABAC, another entropy coding scheme gets enabled, called CAVLC (context adaptive variable-length coding). CAVLC is a lot less efficient, which is why it needs 15\% more bitrate to achieve the same quality as CABAC."; + @"After the encoder has done its work, it has a bunch of data that needs to be compressed losslessly, similar to ZIP or RAR. H.264 provides two options for this: CAVLC and CABAC. CABAC decodes a lot slower but compresses significantly better (10-30%), especially at lower bitrates. If you're looking to minimize CPU requirements for video playback, disable this option. Baseline profile, as required for iPods and similar devices, requires CABAC to be disabled."; [fX264optCabacSwitch setToolTip: toolTip]; [fX264optCabacLabel setToolTip: toolTip]; + + /* Adaptive Quantization Strength fX264opAqSlider */ + [fX264optAqSlider setMinValue:0.0]; + [fX264optAqSlider setMaxValue:2.0]; + [fX264optAqSlider setTickMarkPosition:NSTickMarkBelow]; + [fX264optAqSlider setNumberOfTickMarks:21]; + [fX264optAqSlider setAllowsTickMarkValuesOnly:YES]; + [fX264optAqSlider setFloatValue:1.0]; + toolTip = + @"Adaptive quantization controls how the encoder distributes bits across the frame. Higher values take more bits away from edges and complex areas to improve areas with finer detail."; + [fX264optAqSlider setToolTip: toolTip]; + [fX264optAqLabel setToolTip: toolTip]; /* PsyRDO fX264optPsyRDSlider */ [fX264optPsyRDSlider setMinValue:0.0]; - [fX264optPsyRDSlider setMaxValue:1.0]; + [fX264optPsyRDSlider setMaxValue:2.0]; [fX264optPsyRDSlider setTickMarkPosition:NSTickMarkBelow]; - [fX264optPsyRDSlider setNumberOfTickMarks:11]; + [fX264optPsyRDSlider setNumberOfTickMarks:21]; [fX264optPsyRDSlider setAllowsTickMarkValuesOnly:YES]; [fX264optPsyRDSlider setFloatValue:1.0]; toolTip = - @"Psychovisual Rate Distortion Optimization sure is a mouthful, isn't it? Basically, it means x264 tries to retain detail, for better quality to the human eye, as opposed to trying to maximize quality the way a computer understands it, through signal-to-noise ratios that have trouble telling apart fine detail and noise."; + @"Psychovisual rate-distortion optimization takes advantage of the characteristics of human vision to dramatically improve apparent detail and sharpness. The effect can be made weaker or stronger by adjusting the strength. Being an RD algorithm, it requires mode decision to be at least \"6\"."; [fX264optPsyRDSlider setToolTip: toolTip]; [fX264optPsyRDLabel setToolTip: toolTip]; @@ -307,11 +313,11 @@ [fX264optPsyTrellisSlider setMinValue:0.0]; [fX264optPsyTrellisSlider setMaxValue:1.0]; [fX264optPsyTrellisSlider setTickMarkPosition:NSTickMarkBelow]; - [fX264optPsyTrellisSlider setNumberOfTickMarks:11]; + [fX264optPsyTrellisSlider setNumberOfTickMarks:21]; [fX264optPsyTrellisSlider setAllowsTickMarkValuesOnly:YES]; [fX264optPsyTrellisSlider setFloatValue:0.0]; toolTip = - @"Psychovisual Trellis tries to retain more sharpness and detail, but can cause artifacting. It is considered experimental, which is why it's off by default. Good values are 0.1 to 0.2."; + @"Psychovisual trellis is an experimental algorithm to further improve sharpness and detail retention beyond what Psychovisual RD does. Recommended values are around 0.2, though higher values may help for very grainy video or lower bitrate encodes. Not recommended for cel animation and other sharp-edged graphics."; [fX264optPsyTrellisSlider setToolTip: toolTip]; [fX264optPsyTrellisLabel setToolTip: toolTip]; @@ -412,12 +418,6 @@ cleanOptNameString = @"ref"; } - /*No Fast PSkip nofast_pskip*/ - if ([cleanOptNameString isEqualToString:@"no-fast-pskip"] || [cleanOptNameString isEqualToString:@"no_fast_pskip"] || [cleanOptNameString isEqualToString:@"nofast_pskip"]) - { - cleanOptNameString = @"no-fast-pskip"; - } - /*No Dict Decimate*/ if ([cleanOptNameString isEqualToString:@"no-dct-decimate"] || [cleanOptNameString isEqualToString:@"no_dct_decimate"] || [cleanOptNameString isEqualToString:@"nodct_decimate"]) { @@ -434,12 +434,6 @@ if ([cleanOptNameString isEqualToString:@"me-range"] || [cleanOptNameString isEqualToString:@"me_range"]) cleanOptNameString = @"merange"; - /*WeightB*/ - if ([cleanOptNameString isEqualToString:@"weight-b"] || [cleanOptNameString isEqualToString:@"weight_b"]) - { - cleanOptNameString = @"weightb"; - } - /*B Pyramid*/ if ([cleanOptNameString isEqualToString:@"b_pyramid"]) { @@ -474,36 +468,28 @@ { /* Lots of situations to cover. - B-frames (when 0 turn of b-frame specific stuff, when < 2 disable b-pyramid) - - CABAC (when 0 turn off trellis) - - analysis (if none, turn off 8x8dct) - - refs (under 2, disable mixed-refs) + - CABAC (when 0 turn off trellis and psy-trel) - subme (if under 6, turn off psy-rd and psy-trel) - trellis (if 0, turn off psy-trel) */ if( sender == fX264optBframesPopUp || sender == nil || sender == fDisplayX264Options ) { - if ( [fX264optBframesPopUp indexOfSelectedItem ] > 0 && - [fX264optBframesPopUp indexOfSelectedItem ] < 2) + if ( [fX264optBframesPopUp indexOfSelectedItem ] == 1 ) { - /* If the b-frame widget is at 0 or 1, the user has chosen + /* If the b-frame widget is at 1, the user has chosen not to use b-frames at all. So disable the options that can only be used when b-frames are enabled. */ - if( [fX264optWeightBSwitch isHidden] == false) - { - [[fX264optWeightBSwitch animator] setHidden:YES]; - [[fX264optWeightBLabel animator] setHidden:YES]; - if ( [fX264optWeightBSwitch state] == 1 ) - [fX264optWeightBSwitch performClick:self]; - } - - if( [fX264optBPyramidSwitch isHidden] == false ) + if( [fX264optBPyramidPopUp isHidden] == false ) { - [[fX264optBPyramidSwitch animator] setHidden:YES]; + [[fX264optBPyramidPopUp animator] setHidden:YES]; [[fX264optBPyramidLabel animator] setHidden:YES]; - if ( [fX264optBPyramidSwitch state] == 1 ) - [fX264optBPyramidSwitch performClick:self]; + if ( [fX264optBPyramidPopUp indexOfSelectedItem] > 0 ) + { + [fX264optBPyramidPopUp selectItemAtIndex: 0]; + [[fX264optBPyramidPopUp cell] performClick:self]; + } } if( [fX264optDirectPredPopUp isHidden] == false ) @@ -531,20 +517,17 @@ else if ( [fX264optBframesPopUp indexOfSelectedItem ] == 2) { /* Only 1 b-frame? Disable b-pyramid. */ - if( [fX264optBPyramidSwitch isHidden] == false ) + if( [fX264optBPyramidPopUp isHidden] == false ) { - [[fX264optBPyramidSwitch animator] setHidden:YES]; + [[fX264optBPyramidPopUp animator] setHidden:YES]; [[fX264optBPyramidLabel animator] setHidden:YES]; - if ( [fX264optBPyramidSwitch state] == 1 ) - [fX264optBPyramidSwitch performClick:self]; + if ( [fX264optBPyramidPopUp indexOfSelectedItem] > 0 ) + { + [fX264optBPyramidPopUp selectItemAtIndex: 0]; + [[fX264optBPyramidPopUp cell] performClick:self]; + } } - if( [fX264optWeightBSwitch isHidden] == true ) - { - [[fX264optWeightBSwitch animator] setHidden:NO]; - [[fX264optWeightBLabel animator] setHidden:NO]; - } - if( [fX264optDirectPredPopUp isHidden] == true ) { [[fX264optDirectPredPopUp animator] setHidden:NO]; @@ -559,18 +542,12 @@ } else { - if( [fX264optBPyramidSwitch isHidden] == true ) + if( [fX264optBPyramidPopUp isHidden] == true ) { - [[fX264optBPyramidSwitch animator] setHidden:NO]; + [[fX264optBPyramidPopUp animator] setHidden:NO]; [[fX264optBPyramidLabel animator] setHidden:NO]; } - if( [fX264optWeightBSwitch isHidden] == true ) - { - [[fX264optWeightBSwitch animator] setHidden:NO]; - [[fX264optWeightBLabel animator] setHidden:NO]; - } - if( [fX264optDirectPredPopUp isHidden] == true ) { [[fX264optDirectPredPopUp animator] setHidden:NO]; @@ -596,61 +573,32 @@ [[fX264optTrellisLabel animator] setHidden:YES]; [fX264optTrellisPopUp selectItemAtIndex:0]; [[fX264optTrellisPopUp cell] performClick:self]; + + if( [fX264optPsyTrellisSlider isHidden] == false) + { + [[fX264optPsyTrellisSlider animator] setHidden:YES]; + [[fX264optPsyTrellisLabel animator] setHidden:YES]; + if ( [fX264optPsyTrellisSlider floatValue] > 0.0 ) + { + [fX264optPsyTrellisSlider setFloatValue:0.0]; + [[fX264optPsyTrellisSlider cell] performClick:self]; + } + } } } else if( [fX264optTrellisPopUp isHidden] == true) { [[fX264optTrellisPopUp animator] setHidden:NO]; [[fX264optTrellisLabel animator] setHidden:NO]; - } - } - - if( sender == fX264optAnalysePopUp || sender == nil || sender == fDisplayX264Options ) - { - if ( [fX264optAnalysePopUp indexOfSelectedItem] == 1) - { - /* No analysis? Disable 8x8dct */ - if( [fX264opt8x8dctSwitch isHidden] == false ) - { - [[fX264opt8x8dctSwitch animator] setHidden:YES]; - [[fX264opt8x8dctLabel animator] setHidden:YES]; - if ( [fX264opt8x8dctSwitch state] == 1 ) - [fX264opt8x8dctSwitch performClick:self]; - } - } - else - { - if( [fX264opt8x8dctSwitch isHidden] == true ) + + if( [fX264optPsyTrellisSlider isHidden] == true) { - [[fX264opt8x8dctSwitch animator] setHidden:NO]; - [[fX264opt8x8dctLabel animator] setHidden:NO]; + [[fX264optPsyTrellisSlider animator] setHidden:NO]; + [[fX264optPsyTrellisLabel animator] setHidden:NO]; } } } - if( sender == fX264optRefPopUp || sender == nil || sender == fDisplayX264Options ) - { - if ( [fX264optRefPopUp indexOfSelectedItem] > 0 && - [fX264optRefPopUp indexOfSelectedItem] < 3 ) - { - if( [fX264optMixedRefsSwitch isHidden] == false ) - { - /* Only do mixed-refs when there are at least 2 refs to mix. */ - [[fX264optMixedRefsSwitch animator] setHidden:YES]; - [[fX264optMixedRefsLabel animator] setHidden:YES]; - if( [fX264optMixedRefsSwitch state] == 1 ) - [fX264optMixedRefsSwitch performClick:self]; - } - } - else - { - if( [fX264optMixedRefsSwitch isHidden] == true ) - { - [[fX264optMixedRefsSwitch animator] setHidden:NO]; - [[fX264optMixedRefsLabel animator] setHidden:NO]; - } - } - } if( sender == fX264optMotionEstPopUp || sender == nil || sender == fDisplayX264Options ) { @@ -688,7 +636,6 @@ { [[fX264optPsyRDSlider animator] setHidden:YES]; [[fX264optPsyRDLabel animator] setHidden:YES]; - [[fX264optPsyRDSlider animator] setFloatValue:1]; if ( [fX264optPsyRDSlider floatValue] < 1.0 ) { [fX264optPsyRDSlider setFloatValue:1.0]; @@ -700,7 +647,6 @@ { [[fX264optPsyTrellisSlider animator] setHidden:YES]; [[fX264optPsyTrellisLabel animator] setHidden:YES]; - [[fX264optPsyTrellisSlider animator] setFloatValue:0]; if ( [fX264optPsyTrellisSlider floatValue] > 0.0 ) { [fX264optPsyTrellisSlider setFloatValue:0.0]; @@ -796,12 +742,29 @@ /*ref NSPopUpButton*/ if ([optName isEqualToString:@"ref"]) { - [fX264optRefPopUp selectItemAtIndex:[optValue intValue]+1]; + // Clamp values to a minimum of 1 and a maximum of 16 + if ( [optValue intValue] < 1 ) + { + [fX264optRefPopUp selectItemAtIndex:1]; + [ self X264AdvancedOptionsChanged: fX264optRefPopUp]; + } + else if ( [optValue intValue] > 16 ) + { + [fX264optRefPopUp selectItemAtIndex:16]; + [ self X264AdvancedOptionsChanged: fX264optRefPopUp]; + } + else + { + [fX264optRefPopUp selectItemAtIndex:[optValue intValue]]; + } } - /*No Fast PSkip NSButton*/ - if ([optName isEqualToString:@"no-fast-pskip"]) + /*WeightP NSButton*/ + if ([optName isEqualToString:@"weightp"]) { - [fX264optNfpskipSwitch setState:[optValue intValue]]; + if ([optValue intValue] < 1) + [fX264optWeightPSwitch setState:0]; + else + [fX264optWeightPSwitch setState:1]; } /*No Dict Decimate NSButton*/ if ([optName isEqualToString:@"no-dct-decimate"]) @@ -818,11 +781,6 @@ { [fX264optTrellisPopUp selectItemAtIndex:[optValue intValue]+1]; } - /*Mixed Refs NSButton*/ - if ([optName isEqualToString:@"mixed-refs"]) - { - [fX264optMixedRefsSwitch setState:[optValue intValue]]; - } /*Motion Estimation NSPopUpButton*/ if ([optName isEqualToString:@"me"]) { @@ -847,18 +805,41 @@ { [fX264optBAdaptPopUp selectItemAtIndex:[optValue intValue]+1]; } - /*Weighted B-Frames NSButton*/ - if ([optName isEqualToString:@"weightb"]) - { - [fX264optWeightBSwitch setState:[optValue intValue]]; - } /*B Pyramid NSPButton*/ if ([optName isEqualToString:@"b-pyramid"]) { - [fX264optBPyramidSwitch setState:[optValue intValue]]; - } + + if( [optValue isEqualToString:@"normal"] ) + { + [self X264AdvancedOptionsChanged: fX264optBPyramidPopUp]; + [fX264optBPyramidPopUp selectItemAtIndex:0]; + } + else if( [optValue isEqualToString:@"2"] ) + { + [fX264optBPyramidPopUp selectItemAtIndex:0]; + [self X264AdvancedOptionsChanged: fX264optBPyramidPopUp]; + } + if( [optValue isEqualToString:@"strict"] ) + { + [fX264optBPyramidPopUp selectItemAtIndex:2]; + } + else if( [optValue isEqualToString:@"1"] ) + { + [fX264optBPyramidPopUp selectItemAtIndex:2]; + [self X264AdvancedOptionsChanged: fX264optBPyramidPopUp]; + } + if( [optValue isEqualToString:@"none"] ) + { + [fX264optBPyramidPopUp selectItemAtIndex:1]; + } + else if( [optValue isEqualToString:@"0"] ) + { + [fX264optBPyramidPopUp selectItemAtIndex:1]; + [self X264AdvancedOptionsChanged: fX264optBPyramidPopUp]; + } + } /*Direct B-frame Prediction NSPopUpButton*/ - if ([optName isEqualToString:@"direct"]) + if ([optName isEqualToString:@"direct"]) { if ([optValue isEqualToString:@"none"]) [fX264optDirectPredPopUp selectItemAtIndex:1]; @@ -917,17 +898,24 @@ { if ([optValue isEqualToString:@"p8x8,b8x8,i8x8,i4x4"]) { - /* Default ("some") */ + /* Default ("most") */ [fX264optAnalysePopUp selectItemAtIndex:0]; } - if ([optValue isEqualToString:@"none"]) + else if ([optValue isEqualToString:@"i4x4,i8x8"] || + [optValue isEqualToString:@"i8x8,i4x4"] ) + { + /* Some */ + [fX264optAnalysePopUp selectItemAtIndex:2]; + } + else if ([optValue isEqualToString:@"none"]) { [fX264optAnalysePopUp selectItemAtIndex:1]; } - if ([optValue isEqualToString:@"all"]) + else if ([optValue isEqualToString:@"all"]) { - [fX264optAnalysePopUp selectItemAtIndex:2]; + [fX264optAnalysePopUp selectItemAtIndex:3]; } + } /* 8x8 DCT NSButton */ if ([optName isEqualToString:@"8x8dct"]) @@ -939,6 +927,11 @@ { [fX264optCabacSwitch setState:[optValue intValue]]; } + /* Adaptive Quantization Strength NSSlider */ + if ([optName isEqualToString:@"aq-strength"]) + { + [fX264optAqSlider setFloatValue:[optValue floatValue]]; + } /* Psy-RD and Psy-Trellis NSSliders */ if ([optName isEqualToString:@"psy-rd"]) { @@ -970,9 +963,9 @@ { optNameToChange = @"ref"; } - if (widget == fX264optNfpskipSwitch) + if (widget == fX264optWeightPSwitch) { - optNameToChange = @"no-fast-pskip"; + optNameToChange = @"weightp"; } if (widget == fX264optNodctdcmtSwitch) { @@ -986,10 +979,6 @@ { optNameToChange = @"trellis"; } - if (widget == fX264optMixedRefsSwitch) - { - optNameToChange = @"mixed-refs"; - } if (widget == fX264optMotionEstPopUp) { optNameToChange = @"me"; @@ -1002,11 +991,7 @@ { optNameToChange = @"b-adapt"; } - if (widget == fX264optWeightBSwitch) - { - optNameToChange = @"weightb"; - } - if (widget == fX264optBPyramidSwitch) + if (widget == fX264optBPyramidPopUp) { optNameToChange = @"b-pyramid"; } @@ -1034,6 +1019,10 @@ { optNameToChange = @"cabac"; } + if( widget == fX264optAqSlider) + { + optNameToChange = @"aq-strength"; + } if( widget == fX264optPsyRDSlider) { optNameToChange = @"psy-rd"; @@ -1066,6 +1055,19 @@ } } + else if ([optName isEqualToString:@"aq-strength"]) + { + if( [fX264optAqSlider floatValue] == 1.0 ) + { + /* When Aq is 1 it's the default value and can be ignored. */ + thisOpt = @""; + } + else + { + thisOpt = [NSString stringWithFormat:@"%@=%0.1f", optName, [fX264optAqSlider floatValue] ]; + } + } + else if ([optName isEqualToString:@"psy-rd"]) { if( [fX264optPsyRDSlider floatValue] == 1.0 && [fX264optPsyTrellisSlider floatValue] == 0.0 ) @@ -1077,11 +1079,11 @@ { /* Otherwise the format is deblock=a,b, where a and b both have an array offset of 7 because deblocking values start at -6 instead of at zero. */ - thisOpt = [NSString stringWithFormat:@"%@=%0.1f,%0.1f", optName, [fX264optPsyRDSlider floatValue], [fX264optPsyTrellisSlider floatValue] ]; + thisOpt = [NSString stringWithFormat:@"%@=%0.1f,%0.2f", optName, [fX264optPsyRDSlider floatValue], [fX264optPsyTrellisSlider floatValue] ]; } } - else if /*Boolean Switches*/ ( [optName isEqualToString:@"b-pyramid"] || [optName isEqualToString:@"no-fast-pskip"] || [optName isEqualToString:@"no-dct-decimate"] ) + else if /*Boolean Switches*/ ( [optName isEqualToString:@"no-dct-decimate"] ) { /* Here is where we take care of the boolean options that work overtly: no-dct-decimate being on means no-dct-decimate=1, etc. Some options @@ -1099,7 +1101,7 @@ } } - else if ( [optName isEqualToString:@"8x8dct"] || [optName isEqualToString:@"weightb"] || [optName isEqualToString:@"mixed-refs"] || [optName isEqualToString:@"cabac"] ) + else if ( [optName isEqualToString:@"8x8dct"] || [optName isEqualToString:@"cabac"] || [optName isEqualToString:@"weightp"] ) { /* These options default to being on. That means they only need to be included in the string when turned off. */ @@ -1188,8 +1190,10 @@ case 1: thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"none"]; break; - case 2: + thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"i4x4,i8x8"]; + break; + case 3: thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"all"]; break; @@ -1197,6 +1201,26 @@ break; } } + + else if ([optName isEqualToString:@"b-pyramid"]) + { + /* B-pyramid uses string values too. */ + switch ([sender indexOfSelectedItem]) + { + case 1: + thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"none"]; + break; + case 2: + thisOpt = [NSString stringWithFormat:@"%@=%@",optName,@"strict"]; + break; + case 0: + thisOpt = @""; + break; + + default: + break; + } + } else if ([optName isEqualToString:@"merange"]) { @@ -1212,12 +1236,18 @@ thisOpt = [NSString stringWithFormat:@"%@=%d", optName, [sender indexOfSelectedItem]-1]; } + else if ([optName isEqualToString:@"ref"]) + { + /* Refs use actual index numbers */ + thisOpt = [NSString stringWithFormat:@"%@=%d",optName,[sender indexOfSelectedItem]]; + } + else // we have a valid value to change, so change it { if ( [sender indexOfSelectedItem] != 0 ) - /* Here's our general case, that catches things like ref frames and b-frames. + /* Here's our general case, that catches things like b-frames. Basically, any options that are PopUp menus with index 0 as default and - index 1 as 1, with numerical values, are all handled right here. All of + index 1 as 0, with numerical values, are all handled right here. All of the above stuff is for the exceptions to the general case. */ thisOpt = [NSString stringWithFormat:@"%@=%d",optName,[sender indexOfSelectedItem]-1]; } -- cgit v1.2.3