
# Note this file is hierarchical.  Options defined later in the file (or other files) override earlier settings.
#   There are a limited set of positive conditinals that can be used in if/endif pairs.  Any
#   undefined conditional will evaluate to 0, and the block will be skipped.


# -------------------
# default options

# show the options as they load (set to 1 here)
showLoadingOptions 0

# enable reading the full range of formats supported by ACR
imagecoreFullFormatSupport 1

# cleanup NSLog output (no timesteamp or process), just string
cleanNSLog 0

# in a debug build, print asserts (deprecated for imagecore)
printAsserts   1

# display running thread names to see where tasks are running
printTasks 0

# in a debug/profile build, break on asserts in the debugger
breakOnAsserts 1
if qProfile
	breakOnAsserts 0
endif

# in a debug/profile build, break on cr_loge in the debugger
breakOnLogs 0

# turn on SIMD optimizations
useVector      1

# test the SIMD layer, can run this on SSE/Neon platforms
testSIMD       0

# generate the tests for the SIMD layer, paste into glue layer
testSIMDGenerate       0

# limit thread count, 0 for default max numProcessors
limitThreads 0

# use 1 thread only or limitThreads
oneThread 0

# whether to use hyperthreading to determine thread count, HT shares 1 SIMD unit
hyperThread 0

# whether to use a thread pool on Jpeg/ACE
threadPool 1

# view the tasks running on the Jpeg/ACE thread pool
jpegViewTasks 0

# whether to use the passed tile thread (1) or the thread pool (0)
jpegUseTiledThread 1

# whether to use SIMD
jpegUseSIMD 1

# turn on fast jpeg read path
fastRead     1

# jpeg read/wrte buffer sizes (in KB)
jpegReadBufferSize  256
jpegWriteBufferSize 64

# whether to use Fiala-style clipping (smaller)
jpegUseClipping 1


# set the percent of memory to flush down to when we need to allocate a new tile
scratchVMLimitPercent        100

# set the percent of memory to flush down to when we're low on memory
scratchVMLimitPercentForced    30

# set the percentage of physical memory to use
percentMemory 50

# set the percentage to start purging tiles
percentLowMemory 90 

# limit max memory used for vm cache/block pool (in MB)
maxMemory    512

# display verbose data about XMP metadata
verboseXMP   0

# turn on all imagecore logging output
verboseImagecore 1

# display the stages before and as they are run
printStages  0

# display the stage/bottleneck timings (detailed)
printTimings  0

# print large image buffer allocations for rendering as they occur
printImageBufferAllocs 0

# display the overall timers 
showTimers    1

if qRevel
showTimers 0
endif

#if qPSX
#showTimers 0
#endif

#-----------

# vm tile size (in bytes), 0 for default >256K (266112), <256 (261888), =256(262144)
tileSize     262144

# specify a fixed block size (vm)
fixedBlockSizeX 0
fixedBlockSizeY 0

#-----------
# specify a fixed block size (pipe) 
pipeBlockSizeX  256
pipeBlockSizeY  256

# pipe buffer bytes (in KB), default 256K, one per processor
pipeBufferBytes 256

# pipe buffer multiplier, overrides existing tile size in most renders, multiplied by render scale, 0 disables, default 384
pipeBufferMultiplier 384

#-----------

# use the noise cache
useNoiseCache   0

# this is the level of the preview render (-1 for off, for pixel doubling set to 1)
renderPreviewLevel    2

# this is the level of the draft render (-1 for off, for pixel doubling set to 0)
renderDraftLevel      1

# this is the level of the final render (-1 for off)
renderFinalLevel      0

# changes in this % range will only cause pixel doubling (0 is off)
renderLevelAdjustEpsilon      5

# this skips adding a 3K ICC profile to every saved JPEG
skipICCProfileForSRGB 0

# limited by device GPUs, was 2304
proxyDNGSize 2560

# 0 means use proxyDNGSize^2
proxyDNGCount 0

# auto tone affects blacks/whites
autoToneBW 0

# control background updates
skipBackgroundUpdate 0

# control the zoom fix 
zoomFix 0

# Enable or disable lens profile use in parameter used with ICImageView renders for debugging or testing purposes.
# If enabling, it will use whatever is set in the apiLensProfileEnable parameter for render.  If disabling, it will
# override that parameter to 0.
# Shipping builds should always set enableLensProfiles to 1.
enableLensProfiles 1

# Enable use of camera profile in parameter used with ICImageView renders for debugging or testing purposes.
# If disabling, the default camera profile for the negative will be used since it's not possible to completely disable use.
# Note that the default may vary depending on what profiles are available on the device.
# Shipping builds should always set it to 1.
enableCameraProfiles 1

# -------------------

# Current process version and set it to the desired process version.

currentProcessVersion 2013

# these aren't necessary since they use the default, but are here for completeness
if qImagecoreServer
    currentProcessVersion 2013
endif

if qImagecore
    currentProcessVersion 2013
endif

if qImagecoreHeadless
    currentProcessVersion 2013
endif

if qThio
    currentProcessVersion 2012
endif

if qPSX
    currentProcessVersion 2013
endif

if qRevel
    currentProcessVersion 2013
endif

# -------------------
# gpu (at startup only)

# turn on generation of gpu shaders 
gpuGenerateShaders 0

# the full path to the shader output dir to generate shaders
gpuGenerateShadersDir ""

# the full path to the shader src to generate shaders
gpuGenerateFragmentsDir ""

# this generates shaders for all platforms (gpuGenerateShaders must also be set)
gpuGenerateAllShaders 1

# turn on gpu view
gpuView 0

# turn on logging
gpuVerbose 0

# turn on detailed dumps at create
gpuVerboseReflect 0

# turn on detailed dumps of the gpu view
gpuVerboseView 0

# dump all device events as markers (no scoping)
gpuEventsAsMarkers 0

# dump device events to the log
gpuEventsToLog 1

# dump shaders with issues to the log
gpuShadersToLog 0

# dump out profiling timers
gpuProfTimers 0

# dump timers to log (already sends to HUD)
gpuLogTimers 1

# draw raw
gpuRaw 0

# turn on live previews on GPU
gpuPreviews 0

# print shader asssembly to log
gpuShaderAssemblyToLog 0

# -------------------
# ios test app settings

# set this to the name of a test image to load it after the app launches
loadAssetNamed ""

# set this to the name of a test script to run it after the app launches
# this is ignored if loadAssetNamed is also set
#loadScriptNamed "LrATestScript_FunctionalTest.txt"
loadScriptNamed ""

# set this to the name of a test suite, ex: "sanity/*" to run unit tests after the app launches
# this is ignored if loadAssetNamed or loadScriptNamed is also set
runUnitTestSuite "sanity/*"

# display stats about the render rect to the screen
doStats       0

# output debug text to stdout, uses showDebugTextFilter for now
dumpDebugText 0

# show debug text to the screen in a hud
showDebugText 1

# show the console
showConsoleText 0

# this is an ordered list of the hud items to display
showDebugTextFilter "123456789FABCDE"

# show prof output to the screen
doProfReport  1

# profile the rendering
profileRender    0

# set this to 1 to use a single, dynamic slider and parameter picker instead of 6 unlabeled sliders
useDynamicParamSlider 1

# lock the orient for performance testing (0 - free, 1 - portrait, 3 - landscape)   NOTE: not working
deviceOrientLocked 0

# JPEG Encoding Quality
# Uses Photoshop's 0-12 Scale
thumbnailPhotoshopJPEGQuality 9
previewPhotoshopJPEGQuality 9
fullsizePhotoshopJPEGQuality 9

# these are the maximum sizes used to dump out previews/thumbnails
previewMaxWidth    1440
previewMaxHeight	   1024
thumbnailMaxWidth  2000
thumbnailMaxHeight 148

# to test various denoise/sharpen settings (0 to 3)
#sharpenSetting 0
#denoiseLuminanceSetting 0
#denoiseColorSetting 0

# can disable/enable color denoise from denoiseSetting
#denoiseColor     1
#denoiseLuminance 1

# The default number of times the "Load" scripting command repeats.
# The Load command supports an optional repeat=n argument, this sets
# the default used when the repeat is omitted.
defaultScriptingLoadCommandRepeats 1


# Number of pyramid levels to add to fast quality level of GPU 2 display when two quality levels
# (best and fast) are in use. The sum will be capped by the maximum pyramid level allowed.
# Setting this to 1 for Imagecore clients for time being.

addPyramidLevelsToFastQuality 1

# Scan application's bundle directory for camera or lens profiles
# Turn this on if application is deploying profiles in the bundle
# directory so that CameraRaw will scan and cache profile data.
addAppDirForProfiles 1

# iOS only: settings used for remote logging
testLogListenerAddr ""
testLogListenerPort 0

# -------------------
# from ICTestScriptRunner

# skip presets with denoise in them
testScriptSkipDenoise     0

# load files only if filename differs (first timing is load + render, subsequent timing is render) 
testScriptSkipReloading   1

# have test script write output to a file (1) or stdout (0)
testScriptOutputToFile    0

# tests that animate moving a slider will animate at this rate - in millisecons
testScriptSliderAnimationRate	33

# tests that animate moving a slider will move the incrment or decrement the slider value by this much
# these are absolute units that the slider will move between the slider's min and max values,
# the movement relative to the slider's range will vary by adjustment parameter
testScriptSliderAnimationStep	1

# save a full-size image after loading the image in the Load test case
saveFullSizeImageOnLoad	0

# test results posted by the PostTestResults command will go to a development server
postTestResultsToDevServer 0

# sets the hostname (and port if necessary) of the development server.
# for example you may set it to "localhost:8080" if you're running a server locally

testResultsDevServer ""

# consolidate test logs generated by subscripts or create a new log for each subscript
consolidateTestLogs 0

# -------------------
# from cr_render (tie to globals in imagecoreInit)
# runAreaOps
# runDenoiseOnly

# -------------------
# platform options (qiPhone, qiPhoneSimulator, qMacOS)
#   see default above for descriptions of vars

if qiPhone
	percentMemory 20
	maxMemory     512
endif

if qAndroid
	percentMemory 20
	maxMemory     512
	disableLocalCorrectionsCache    1
endif

if qMacOS
	percentMemory 30
	maxMemory     2560
endif

if qWinOS
	if q64Bit
	percentMemory 30
	maxMemory     2560
	endif
	
	if !q64Bit
	percentMemory 30
	maxMemory     512
	endif
	
endif

if qLinux
	percentMemory 30
	maxMemory     2560
endif

# this works well with winphones with 1GB or 2GB RAM when we have set the App as higher memory limit typed.
# see http://msdn.microsoft.com/en-US/library/windowsphone/develop/jj681682(v=vs.105).aspx
#if we need to support 512MB phones, then this might cause out-of-memory while opening larger images
# we can however reduce the memory for such devices, if needed
if qWinPhone
	percentMemory 20
	maxMemory     512 
endif


if qiPhone
	# device options (start with d)
    if diPad
        if diPad1
            
        endif
        if !diPad1
            
        endif
    endif

    if diPhone
        if diPhone4

        endif

    endif

    if diPod
        if diPod4

        endif

    endif

endif

# -------------------
# force the simulator to emulate a given platform
if qiPhoneSimulator
	
	if diPad3
		limitThreads		2
		maxMemory			204
	endif
	
	if diPad2
		limitThreads		2
		maxMemory			102
	endif

	if diPhone3
		oneThread			1
		maxMemory		    51
	endif
	
	if diPhone4
		limitThreads		2
		maxMemory			102
	endif
	
endif

# -------------------
# force the simulator to emulate a given platform
#  only has 1 actual thread, max of 880MB memory
#  max out the memory to run faster
if qAndroidSimulator
	maxMemory			512
    percentMemory       50
endif

# -------------------
# can override settings for the ship build 
if qShip
   
endif

# can override settings for the profile build
if qTest
    # can do negation of conditionals (effectively an else block)
    if !qiPhoneSimulator

    endif

endif

# -------------------

# test out ACR settings vs. IC on iOS
# ACR
# vm
if 0
    tileSize            266112
    fixedBlockSizeX         0   # will determine based on width/height of image and tileSize cutoff
    fixedBlockSizeY         0
endif

# render
if 0
    pipeBufferBytes         0     # will use 400
    pipeBlockSizeX          0     # will use 512
    pipeBlockSizeY          0
    pipeBufferMultiplier    384
endif

# IC
#vm
if 1
    # vm - 20x block size
    tileSize			 1314720  # +4K of slop, 5 channel max
    fixedBlockSizeX         256
    fixedBlockSizeY         256
endif

# render
if 1
    # overide defaults, speeds up renders and loads by 39MP (40s -> 25s), 18MP (19s -> 10s)
    # render - allow denoise to run with tile of 256x256 @5000 (34s) or 128x128 @3000 (60s) for 18MP image
    #  denoise runs much faster with 6000, wichita w/o denoise uses 2200
    pipeBufferBytes         6000  
    pipeBlockSizeX          256
    pipeBlockSizeY          256
    pipeBufferMultiplier    0

endif

# -------------------


# QE Option Overrides
# These should be if 0'd out
if 0
	postTestResultsToDevServer 0
endif

# -------------------

if qImagecore
# the UI for imagecore allows denoise and sharpening to be tweaked, this option shows the effect in final renders
#  note that these should not cost anything if the sliders are zero
previewDenoiseSharpen 1

endif

# -------------------

if qRevel

# enable the Revel app HUD to poll for memory statistics
# this option is used in Revel only and not in Imagecore.
enableRevelHUD 0

if qTest
    enableRevelHUD 1
endif

# show debug text to the screen in a hud
showDebugText 0

# set this to 1 to use a single, dynamic slider and parameter picker instead of unlabeled sliders
useDynamicParamSlider 0

# these are the maximum sizes used to dump out previews/thumbnails
previewMaxHeight	   1440

# to test various denoise/sharpen settings (0 to 3)
sharpenSetting 0
denoiseLuminanceSetting 0
denoiseColorSetting 0

# can disable/enable color denoise from denoiseSetting
denoiseColor     1
denoiseLuminance 1

# have test script write output to a file (1) or stdout (0)
testScriptOutputToFile    1

if qShip
   showTimers 0
endif

# turns logging on/off for use by Imagecore client apps, including CR and DNG timer loggings.
verboseImagecore 		0

endif

# -------------------

testFilesRootURL "http://acrtestfiles.corp.adobe.com"
ic_test_offline_mode    0

verboseImagecore 		0
showTimers 				0



//Matching tile size with Desktop Client for improved performance.
//Keep an eye on memory usage, especially on low-end devices.

pipeBlockSizeX          0
pipeBlockSizeY          0
fixedBlockSizeX         0
fixedBlockSizeY         0
pipeBufferMultiplier    384
