From: Martin Mares Date: Tue, 13 Jul 2010 12:34:56 +0000 (+0200) Subject: Cleanup: Moved config files to etc/ X-Git-Tag: v5.0~163 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=023a495441c50d66a3dc9cbf3ec655a9b061c3a2;p=libucw.git Cleanup: Moved config files to etc/ --- diff --git a/cf/images b/cf/images deleted file mode 100644 index b02c4d05..00000000 --- a/cf/images +++ /dev/null @@ -1,91 +0,0 @@ -# Configuration of the image library - -######## General parameters ##################################################### - -ImageLib { - -# Default tracing level (0 to disable) -Trace 0 - -# Limits for image allocation -ImageMaxDim 0xffff # Maximum width/height (at most 64k-1) -ImageMaxBytes 256M # Maximum size in bytes - -} - -#if CONFIG_IMAGES_DUP || CONFIG_IMAGES_SIM -######## Image signatures ####################################################### - -ImageSig { - -# To find similar images, Sherlock uses comparison based on regions. -# First of all, the imagesim analyser extracts various region features. -# Sets of these features are called "image signatures" and they are stored -# in the `H' attribute of image objects. - -# Signatures are later processed by the indexer to build an effective -# search structure finally used by the search server. See Indexer and Search -# sections for more options. - -# Minimum image size to apply segmentation. Smaller images are always -# compared by the simple "average" method (see ImageSig.CompareMethod). -MinWidth 16 -MinHeight 16 - -# List of subdivision thresholds in the first phase of segmentation. -# Lower the values to increase the average number of regions and vice versa. -PreQuantThresholds 6 12 15 20 25 25 30 30 40 40 50 50 60 60 60 - -# Settings for the second phase of segmentation -- usually not so important. -# We use an iterative algorithm to improve the average error from the first phase. -# We stop the process after PostQuantMaxSteps or if we get only PostQuantThreshold -# percentual improvement over the previous step. -PostQuantMinSteps 2 -PostQuantMaxSteps 10 -PostQuantThreshold 1 - -# BorderBonus and BorderSize parameters can increase or decrease the weight -# of image pixels near the borders. Weight of all pixels more than BorderSize * MIN(cols, rows) -# pixels far from the edges is 128. Then this value continuously decreses/increses up to 128+BorderSize. -BorderSize 0.4 -BorderBonus -50 - -# Scaling constants for computation of normalized i-th order inertia features (I1, I2, I3). -InertiaScale 2 0.5 0.05 - -# Threshold for detecting textured images (see images/sig-txt.c for details). -# Decrease the threshold if you want less detected textures, -# set it to zero to disable the algorithm completely. -TexturedThreshold 0.32 - -# Signature comparison method: -# -# integrated -# based on: James Z. Wang, Jia Li and Gio Wiederhold, -# "SIMPLIcity: Semantics-Sensitive Integrated Matching for Picture Libraries", -# IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 23, no. 9, pp. 947-963, 2001. -# -# fuzzy (unstable and unbalanced parameters) -# based on: Yixin Chen and James Z. Wang, -# "A Region-Based Fuzzy Feature Matching Approach to Content-Based Image Retrieval", -# IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 24, no. 9, pp. 1252-1267, 2002. -# -# average -# Simple distance of image features averages (ignores segmentation). -# -CompareMethod integrated - -# Array of multiplicative constants in feature vector distance computation -# (L, u, v, LH, HL, HH, I1, I2, I3, X, Y). Each one must be an integer in range 0..15, default is 4. -CompareFeaturesWeights 4 6 6 4 4 4 4 4 4 4 4 - -} - -#endif -#ifdef CONFIG_IMAGES_DUP -######## Duplicate finder ####################################################### - -ImageDup { -# Detection of image duplicates does not work yet. -} -#endif diff --git a/cf/libucw b/cf/libucw deleted file mode 100644 index aa7db8bc..00000000 --- a/cf/libucw +++ /dev/null @@ -1,247 +0,0 @@ -# Configuration of the UCW library and related utilities - -######## Memory Mapped Access to Files ########################################## - -# Whenever you specify 0 for I/O buffer size, memory mapping is used instead. -FBMMap { - -# Map this many bytes at once (needs to be a multiple of CPU page size) -WindowSize 1M - -# When in need to extend a file, grow it by so many bytes (>= page size) -ExtendSize 1M - -} - -######## Direct Streamed I/O on Files ########################################### - -FBDirect { - -# Debug: Cheat by turning off O_DIRECT -#Cheat 1 - -} - -######## Atomic Multi-Threaded I/O on Files ##################################### - -FBAtomic { - -# Enable tracing -#Trace 1 - -} - -######## Parametrized I/O on Files ############################################## - -FBParam { - -Defaults { - -# Access type (std|direct|mmap). -Type std - -# Size of I/O buffer. Something of the order of megabytes for fast disks is recommended for direct I/O. -BufSize 64K - -# Optimize for mixed forward/backward reading (standard I/O only) -KeepBackBuf 0 - -# Perform read-ahead (direct I/O only) -ReadAhead 1 - -# Maximum number of write-back requests queued (direct I/O only) -WriteBack 1 - -} - -} - -######## Temporary files ######################################################## - -Tempfiles { - -# By default, we use the system's default temporary directory ($TMPDIR or /tmp), -# but sometimes it is better to store the temporary files in the local tree. -Dir @INSTALL_VAR_PREFIX@tmp - -# Prefix of temporary file names -Prefix temp- - -# By default, we append a random number to Prefix to get a temporary file name. -# If Prefix points to a directory that is not writable by malicious users, -# we can be less careful and use more consistent names of temporary files -# formed by adding "pid(-tid)-counter" instead. -PublicDir 0 - -} - -######## Threads ################################################################ - -Threads { - -# Default thread stack size -DefaultStackSize 64K - -} - -######## Sorter ################################################################# - -Sorter { - -# Trace sorting (1=basic statistics, 2=more stats, 3 and more for debugging) -Trace 2 - -# Trace array sorting (internal sorters) -TraceArray 0 - -# How much memory is the sorter allowed to use -SortBuffer 4M - -# File access used by the sorter (see FBParam section for details) -FileAccess std 256K - -# Use a different file access method for small inputs (less than the specified size) -SmallFileAccess std 64K -SmallInput 64M - -# Min-/Maximum number of bits to use in the external radix-sort (beware, we will open -# 1+2^this files and require a stream buffer for each of them; however, while we are -# doing that, the sort buffer is not allocated). Set both to zero to disable radix-sorting. -MinRadixBits 2 -MaxRadixBits 4 - -# The same for multi-way merging. The memory requirements are also the same, -# but please keep in mind that this can create lots of SortBuffer-sized files, -# so it is probably better to keep it disabled if you have a small SortBuffer. -MinMultiwayBits 2 -MaxMultiwayBits 4 - -# If we did not use radix-sorter to the full width, we still might add some more -# bits to the width to get chunks which are even smaller than SortBuffer, because -# it can speed up internal sorting later. However, we also want to avoid small -# files, so we add only a little. -AddRadixBits 2 - -# Number of threads used for sorting (0=disable threading) -Threads 0 - -# Minimum size of input (in bytes) to consider multi-threaded internal sorting -ThreadThreshold 1M - -# Chunks smaller than ThreadThreshold are sorted by a sequential algorithm, but -# if they are at least of the following size, different chunks are sorted in -# parallel. There is a slight space penalty for setting up the parallel process, -# so better avoid setting this number too small. -ThreadChunk 256 - -# Internal radix-sort stops at this size and switches to QuickSort (must be >0) -RadixThreshold 4K - -# Debugging switches (see the source) -Debug 0 - -} - -######## URL processing ######################################################### - -URL { - -# Ignore spaces at the start/end of a URL -IgnoreSpaces 1 - -# Ignore underflows in relative paths (/../ from root) -IgnoreUnderflow 1 - -# Some URL's with many repeated components are filtered out to avoid infinite -# URL's (e.g. http://czech.recoder.cz/win/iso/win/iso/file.html, or -# http://a.com/?a=b&a=b&a=b, ...). -# The URL is split to components divided by any of the specified separators. -# Then the separators are forgotten and the components between them are -# examined. -ComponentSeparators /&? - -# URL is filtered out if there's a sequence of components in a row with at most -# MaxRepeatLength components and the sequence is repeated more than MinRepeatCount -# times. Default values are high MinRepeatCount and low MaxRepeatLength, so the -# mechanism is disabled. -MinRepeatCount 4 -MaxRepeatLength 4 - -# Maximum number of occurences of a single component in the entire URL (possibly interleaved -# by different components). The detector is disabled by default. -MaxOccurences 4 - -} - -######## Logging ################################################################ - -Logging { - -# In this section, you can define various logging streams which can be referred to by other sections. - -# Stream { -# # The name of the stream -# Name test-log -# -# # When it should log the messages to a file, a name of the file should be specified. -# # Escape sequences for current date and time as described in strftime(3) can be used. -# FileName log/test-%Y%m%d -# -# # If you need to log to stderr or another already opened descriptor, you can specify its number. -# FileDesc 2 -# -# # Instead of a file, a syslog facility can be specified. See syslog(3) for an explanation. -# SyslogFacility daemon -# -# # You can request that syslog includes a process ID in each message. Due to inflexibility -# # of the syslog protocol, all syslog streams active at a moment must agree on this setting. -# # (default: 0) -# SyslogPID 1 -# -# # When logging to files, timestamps with microsecond precision can be requested. (default: 0) -# Microseconds 1 -# -# # Messages logged to this stream can be restricted to a subset of severity levels. -# # Available levels are: debug info warn error info_r warn_r error_r fatal. -# # This configuration item is a bitmap with a default of "all", so we need the ":reset" operator. -# Levels:reset info warn error fatal -# -# # Similarly, messages can be restricted to a subset of message types. The types are -# # specific for each program. This configuration item is a list of type names; by default -# # it is empty, which is equivalent to all types being enabled. -# Types:reset default foo -# -# # Should the message types be logged? They usually do not carry much useful -# # information for the viewer of the log, so they are not included by default, -# # but you might want to see them when tuning the Types setting. (default: 0) -# ShowTypes 1 -# -# # If an error occurs when logging a message to this stream, the program normally -# # logs a special error message to the other streams and continues running. You can -# # however request to exit the program in such cases, so that the log files are -# # guaranteed to be complete. (default: 0) -# ErrorsFatal 1 -# -# # Let stderr of the program point to this file-based log_stream (default: 0) -# StdErrFollows 1 -# -# # Some events are logworthy, but they could happen too frequently and flood the log. -# # You can avoid the flooding by setting up a rate limiter for a specific subset of -# # message types. If more limiters match the type of a message, only the last one applies. -# Limit { -# # A list of message types (default: empty = all types) -# Types default foo -# -# # The maximum allowed sustained rate (messages/second, may be fractional) -# Rate 1 -# -# # Maximum length of a burst temporarily exceeding the rate (default: try to guess) -# Burst 2 -# } -# -# # The messages that have passed the filters and limiters can be forwarded to other -# # log streams. Logging loops are not healthy for your program :) (a list of stream names) -# Substream another-stream -# } - -} diff --git a/etc/images b/etc/images new file mode 100644 index 00000000..b02c4d05 --- /dev/null +++ b/etc/images @@ -0,0 +1,91 @@ +# Configuration of the image library + +######## General parameters ##################################################### + +ImageLib { + +# Default tracing level (0 to disable) +Trace 0 + +# Limits for image allocation +ImageMaxDim 0xffff # Maximum width/height (at most 64k-1) +ImageMaxBytes 256M # Maximum size in bytes + +} + +#if CONFIG_IMAGES_DUP || CONFIG_IMAGES_SIM +######## Image signatures ####################################################### + +ImageSig { + +# To find similar images, Sherlock uses comparison based on regions. +# First of all, the imagesim analyser extracts various region features. +# Sets of these features are called "image signatures" and they are stored +# in the `H' attribute of image objects. + +# Signatures are later processed by the indexer to build an effective +# search structure finally used by the search server. See Indexer and Search +# sections for more options. + +# Minimum image size to apply segmentation. Smaller images are always +# compared by the simple "average" method (see ImageSig.CompareMethod). +MinWidth 16 +MinHeight 16 + +# List of subdivision thresholds in the first phase of segmentation. +# Lower the values to increase the average number of regions and vice versa. +PreQuantThresholds 6 12 15 20 25 25 30 30 40 40 50 50 60 60 60 + +# Settings for the second phase of segmentation -- usually not so important. +# We use an iterative algorithm to improve the average error from the first phase. +# We stop the process after PostQuantMaxSteps or if we get only PostQuantThreshold +# percentual improvement over the previous step. +PostQuantMinSteps 2 +PostQuantMaxSteps 10 +PostQuantThreshold 1 + +# BorderBonus and BorderSize parameters can increase or decrease the weight +# of image pixels near the borders. Weight of all pixels more than BorderSize * MIN(cols, rows) +# pixels far from the edges is 128. Then this value continuously decreses/increses up to 128+BorderSize. +BorderSize 0.4 +BorderBonus -50 + +# Scaling constants for computation of normalized i-th order inertia features (I1, I2, I3). +InertiaScale 2 0.5 0.05 + +# Threshold for detecting textured images (see images/sig-txt.c for details). +# Decrease the threshold if you want less detected textures, +# set it to zero to disable the algorithm completely. +TexturedThreshold 0.32 + +# Signature comparison method: +# +# integrated +# based on: James Z. Wang, Jia Li and Gio Wiederhold, +# "SIMPLIcity: Semantics-Sensitive Integrated Matching for Picture Libraries", +# IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 23, no. 9, pp. 947-963, 2001. +# +# fuzzy (unstable and unbalanced parameters) +# based on: Yixin Chen and James Z. Wang, +# "A Region-Based Fuzzy Feature Matching Approach to Content-Based Image Retrieval", +# IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 24, no. 9, pp. 1252-1267, 2002. +# +# average +# Simple distance of image features averages (ignores segmentation). +# +CompareMethod integrated + +# Array of multiplicative constants in feature vector distance computation +# (L, u, v, LH, HL, HH, I1, I2, I3, X, Y). Each one must be an integer in range 0..15, default is 4. +CompareFeaturesWeights 4 6 6 4 4 4 4 4 4 4 4 + +} + +#endif +#ifdef CONFIG_IMAGES_DUP +######## Duplicate finder ####################################################### + +ImageDup { +# Detection of image duplicates does not work yet. +} +#endif diff --git a/etc/libucw b/etc/libucw new file mode 100644 index 00000000..aa7db8bc --- /dev/null +++ b/etc/libucw @@ -0,0 +1,247 @@ +# Configuration of the UCW library and related utilities + +######## Memory Mapped Access to Files ########################################## + +# Whenever you specify 0 for I/O buffer size, memory mapping is used instead. +FBMMap { + +# Map this many bytes at once (needs to be a multiple of CPU page size) +WindowSize 1M + +# When in need to extend a file, grow it by so many bytes (>= page size) +ExtendSize 1M + +} + +######## Direct Streamed I/O on Files ########################################### + +FBDirect { + +# Debug: Cheat by turning off O_DIRECT +#Cheat 1 + +} + +######## Atomic Multi-Threaded I/O on Files ##################################### + +FBAtomic { + +# Enable tracing +#Trace 1 + +} + +######## Parametrized I/O on Files ############################################## + +FBParam { + +Defaults { + +# Access type (std|direct|mmap). +Type std + +# Size of I/O buffer. Something of the order of megabytes for fast disks is recommended for direct I/O. +BufSize 64K + +# Optimize for mixed forward/backward reading (standard I/O only) +KeepBackBuf 0 + +# Perform read-ahead (direct I/O only) +ReadAhead 1 + +# Maximum number of write-back requests queued (direct I/O only) +WriteBack 1 + +} + +} + +######## Temporary files ######################################################## + +Tempfiles { + +# By default, we use the system's default temporary directory ($TMPDIR or /tmp), +# but sometimes it is better to store the temporary files in the local tree. +Dir @INSTALL_VAR_PREFIX@tmp + +# Prefix of temporary file names +Prefix temp- + +# By default, we append a random number to Prefix to get a temporary file name. +# If Prefix points to a directory that is not writable by malicious users, +# we can be less careful and use more consistent names of temporary files +# formed by adding "pid(-tid)-counter" instead. +PublicDir 0 + +} + +######## Threads ################################################################ + +Threads { + +# Default thread stack size +DefaultStackSize 64K + +} + +######## Sorter ################################################################# + +Sorter { + +# Trace sorting (1=basic statistics, 2=more stats, 3 and more for debugging) +Trace 2 + +# Trace array sorting (internal sorters) +TraceArray 0 + +# How much memory is the sorter allowed to use +SortBuffer 4M + +# File access used by the sorter (see FBParam section for details) +FileAccess std 256K + +# Use a different file access method for small inputs (less than the specified size) +SmallFileAccess std 64K +SmallInput 64M + +# Min-/Maximum number of bits to use in the external radix-sort (beware, we will open +# 1+2^this files and require a stream buffer for each of them; however, while we are +# doing that, the sort buffer is not allocated). Set both to zero to disable radix-sorting. +MinRadixBits 2 +MaxRadixBits 4 + +# The same for multi-way merging. The memory requirements are also the same, +# but please keep in mind that this can create lots of SortBuffer-sized files, +# so it is probably better to keep it disabled if you have a small SortBuffer. +MinMultiwayBits 2 +MaxMultiwayBits 4 + +# If we did not use radix-sorter to the full width, we still might add some more +# bits to the width to get chunks which are even smaller than SortBuffer, because +# it can speed up internal sorting later. However, we also want to avoid small +# files, so we add only a little. +AddRadixBits 2 + +# Number of threads used for sorting (0=disable threading) +Threads 0 + +# Minimum size of input (in bytes) to consider multi-threaded internal sorting +ThreadThreshold 1M + +# Chunks smaller than ThreadThreshold are sorted by a sequential algorithm, but +# if they are at least of the following size, different chunks are sorted in +# parallel. There is a slight space penalty for setting up the parallel process, +# so better avoid setting this number too small. +ThreadChunk 256 + +# Internal radix-sort stops at this size and switches to QuickSort (must be >0) +RadixThreshold 4K + +# Debugging switches (see the source) +Debug 0 + +} + +######## URL processing ######################################################### + +URL { + +# Ignore spaces at the start/end of a URL +IgnoreSpaces 1 + +# Ignore underflows in relative paths (/../ from root) +IgnoreUnderflow 1 + +# Some URL's with many repeated components are filtered out to avoid infinite +# URL's (e.g. http://czech.recoder.cz/win/iso/win/iso/file.html, or +# http://a.com/?a=b&a=b&a=b, ...). +# The URL is split to components divided by any of the specified separators. +# Then the separators are forgotten and the components between them are +# examined. +ComponentSeparators /&? + +# URL is filtered out if there's a sequence of components in a row with at most +# MaxRepeatLength components and the sequence is repeated more than MinRepeatCount +# times. Default values are high MinRepeatCount and low MaxRepeatLength, so the +# mechanism is disabled. +MinRepeatCount 4 +MaxRepeatLength 4 + +# Maximum number of occurences of a single component in the entire URL (possibly interleaved +# by different components). The detector is disabled by default. +MaxOccurences 4 + +} + +######## Logging ################################################################ + +Logging { + +# In this section, you can define various logging streams which can be referred to by other sections. + +# Stream { +# # The name of the stream +# Name test-log +# +# # When it should log the messages to a file, a name of the file should be specified. +# # Escape sequences for current date and time as described in strftime(3) can be used. +# FileName log/test-%Y%m%d +# +# # If you need to log to stderr or another already opened descriptor, you can specify its number. +# FileDesc 2 +# +# # Instead of a file, a syslog facility can be specified. See syslog(3) for an explanation. +# SyslogFacility daemon +# +# # You can request that syslog includes a process ID in each message. Due to inflexibility +# # of the syslog protocol, all syslog streams active at a moment must agree on this setting. +# # (default: 0) +# SyslogPID 1 +# +# # When logging to files, timestamps with microsecond precision can be requested. (default: 0) +# Microseconds 1 +# +# # Messages logged to this stream can be restricted to a subset of severity levels. +# # Available levels are: debug info warn error info_r warn_r error_r fatal. +# # This configuration item is a bitmap with a default of "all", so we need the ":reset" operator. +# Levels:reset info warn error fatal +# +# # Similarly, messages can be restricted to a subset of message types. The types are +# # specific for each program. This configuration item is a list of type names; by default +# # it is empty, which is equivalent to all types being enabled. +# Types:reset default foo +# +# # Should the message types be logged? They usually do not carry much useful +# # information for the viewer of the log, so they are not included by default, +# # but you might want to see them when tuning the Types setting. (default: 0) +# ShowTypes 1 +# +# # If an error occurs when logging a message to this stream, the program normally +# # logs a special error message to the other streams and continues running. You can +# # however request to exit the program in such cases, so that the log files are +# # guaranteed to be complete. (default: 0) +# ErrorsFatal 1 +# +# # Let stderr of the program point to this file-based log_stream (default: 0) +# StdErrFollows 1 +# +# # Some events are logworthy, but they could happen too frequently and flood the log. +# # You can avoid the flooding by setting up a rate limiter for a specific subset of +# # message types. If more limiters match the type of a message, only the last one applies. +# Limit { +# # A list of message types (default: empty = all types) +# Types default foo +# +# # The maximum allowed sustained rate (messages/second, may be fractional) +# Rate 1 +# +# # Maximum length of a burst temporarily exceeding the rate (default: try to guess) +# Burst 2 +# } +# +# # The messages that have passed the filters and limiters can be forwarded to other +# # log streams. Logging loops are not healthy for your program :) (a list of stream names) +# Substream another-stream +# } + +}