Cleanup: comments (long lines) in various intern/ libs
This commit is contained in:
parent
5bbf9029ce
commit
177a0ca131
@ -356,7 +356,8 @@ static void clg_ctx_fatal_action(CLogContext *ctx)
|
||||
static void clg_ctx_backtrace(CLogContext *ctx)
|
||||
{
|
||||
/* Note: we avoid writing fo 'FILE', for backtrace we make an exception,
|
||||
* if necessary we could have a version of the callback that writes to file descriptor all at once. */
|
||||
* if necessary we could have a version of the callback that writes to file
|
||||
* descriptor all at once. */
|
||||
ctx->callbacks.backtrace_fn(ctx->output_file);
|
||||
fflush(ctx->output_file);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* compatibility macros to make every ffmpeg installation appear
|
||||
* like the most current installation (wrapping some functionality sometimes)
|
||||
* it also includes all ffmpeg header files at once, no need to do it
|
||||
* it also includes all ffmpeg header files at once, no need to do it
|
||||
* separately.
|
||||
*
|
||||
* Copyright (c) 2011 Peter Schlaile
|
||||
@ -136,8 +136,8 @@ int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
|
||||
|
||||
#endif
|
||||
|
||||
/* XXX TODO Probably fix to correct modern flags in code? Not sure how old FFMPEG we want to support though,
|
||||
* so for now this will do. */
|
||||
/* XXX TODO Probably fix to correct modern flags in code? Not sure how old FFMPEG we want to
|
||||
* support though, so for now this will do. */
|
||||
|
||||
#ifndef FF_MIN_BUFFER_SIZE
|
||||
# ifdef AV_INPUT_BUFFER_MIN_SIZE
|
||||
@ -215,8 +215,8 @@ int av_get_cropped_height_from_codec(AVCodecContext *pCodecCtx)
|
||||
/* really bad hack to remove this dreadfull black bar at the bottom
|
||||
with Canon footage and old ffmpeg versions.
|
||||
(to fix this properly in older ffmpeg versions one has to write a new
|
||||
demuxer...)
|
||||
|
||||
demuxer...)
|
||||
|
||||
see the actual fix here for reference:
|
||||
|
||||
http://git.libav.org/?p=libav.git;a=commit;h=30f515091c323da59c0f1b533703dedca2f4b95d
|
||||
|
@ -60,13 +60,13 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/** Returns the length of the allocated memory segment pointed at
|
||||
* by vmemh. If the pointer was not previously allocated by this
|
||||
* module, the result is undefined.*/
|
||||
* by vmemh. If the pointer was not previously allocated by this
|
||||
* module, the result is undefined.*/
|
||||
extern size_t (*MEM_allocN_len)(const void *vmemh) ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
/**
|
||||
* Release memory previously allocated by this module.
|
||||
*/
|
||||
* Release memory previously allocated by this module.
|
||||
*/
|
||||
extern void (*MEM_freeN)(void *vmemh);
|
||||
|
||||
#if 0 /* UNUSED */
|
||||
@ -77,23 +77,23 @@ extern short (*MEM_testN)(void *vmemh);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Duplicates a block of memory, and returns a pointer to the
|
||||
* newly allocated block. */
|
||||
* Duplicates a block of memory, and returns a pointer to the
|
||||
* newly allocated block. */
|
||||
extern void *(*MEM_dupallocN)(const void *vmemh) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
/**
|
||||
* Reallocates a block of memory, and returns pointer to the newly
|
||||
* allocated block, the old one is freed. this is not as optimized
|
||||
* as a system realloc but just makes a new allocation and copies
|
||||
* over from existing memory. */
|
||||
* Reallocates a block of memory, and returns pointer to the newly
|
||||
* allocated block, the old one is freed. this is not as optimized
|
||||
* as a system realloc but just makes a new allocation and copies
|
||||
* over from existing memory. */
|
||||
extern void *(*MEM_reallocN_id)(void *vmemh,
|
||||
size_t len,
|
||||
const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
|
||||
ATTR_ALLOC_SIZE(2);
|
||||
|
||||
/**
|
||||
* A variant of realloc which zeros new bytes
|
||||
*/
|
||||
* A variant of realloc which zeros new bytes
|
||||
*/
|
||||
extern void *(*MEM_recallocN_id)(void *vmemh,
|
||||
size_t len,
|
||||
const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
|
||||
@ -103,62 +103,62 @@ extern void *(*MEM_recallocN_id)(void *vmemh,
|
||||
#define MEM_recallocN(vmemh, len) MEM_recallocN_id(vmemh, len, __func__)
|
||||
|
||||
/**
|
||||
* Allocate a block of memory of size len, with tag name str. The
|
||||
* memory is cleared. The name must be static, because only a
|
||||
* pointer to it is stored ! */
|
||||
* Allocate a block of memory of size len, with tag name str. The
|
||||
* memory is cleared. The name must be static, because only a
|
||||
* pointer to it is stored ! */
|
||||
extern void *(*MEM_callocN)(size_t len, const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
|
||||
ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
|
||||
|
||||
/**
|
||||
* Allocate a block of memory of size (len * size), with tag name
|
||||
* str, aborting in case of integer overflows to prevent vulnerabilities.
|
||||
* The memory is cleared. The name must be static, because only a
|
||||
* pointer to it is stored ! */
|
||||
* Allocate a block of memory of size (len * size), with tag name
|
||||
* str, aborting in case of integer overflows to prevent vulnerabilities.
|
||||
* The memory is cleared. The name must be static, because only a
|
||||
* pointer to it is stored ! */
|
||||
extern void *(*MEM_calloc_arrayN)(size_t len,
|
||||
size_t size,
|
||||
const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
|
||||
ATTR_ALLOC_SIZE(1, 2) ATTR_NONNULL(3);
|
||||
|
||||
/**
|
||||
* Allocate a block of memory of size len, with tag name str. The
|
||||
* name must be a static, because only a pointer to it is stored !
|
||||
* */
|
||||
* Allocate a block of memory of size len, with tag name str. The
|
||||
* name must be a static, because only a pointer to it is stored !
|
||||
* */
|
||||
extern void *(*MEM_mallocN)(size_t len, const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
|
||||
ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
|
||||
|
||||
/**
|
||||
* Allocate a block of memory of size (len * size), with tag name str,
|
||||
* aborting in case of integer overflow to prevent vulnerabilities. The
|
||||
* name must be a static, because only a pointer to it is stored !
|
||||
* */
|
||||
* Allocate a block of memory of size (len * size), with tag name str,
|
||||
* aborting in case of integer overflow to prevent vulnerabilities. The
|
||||
* name must be a static, because only a pointer to it is stored !
|
||||
* */
|
||||
extern void *(*MEM_malloc_arrayN)(size_t len,
|
||||
size_t size,
|
||||
const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
|
||||
ATTR_ALLOC_SIZE(1, 2) ATTR_NONNULL(3);
|
||||
|
||||
/**
|
||||
* Allocate an aligned block of memory of size len, with tag name str. The
|
||||
* name must be a static, because only a pointer to it is stored !
|
||||
* */
|
||||
* Allocate an aligned block of memory of size len, with tag name str. The
|
||||
* name must be a static, because only a pointer to it is stored !
|
||||
* */
|
||||
extern void *(*MEM_mallocN_aligned)(size_t len,
|
||||
size_t alignment,
|
||||
const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
|
||||
ATTR_ALLOC_SIZE(1) ATTR_NONNULL(3);
|
||||
|
||||
/**
|
||||
* Same as callocN, clears memory and uses mmap (disk cached) if supported.
|
||||
* Can be free'd with MEM_freeN as usual.
|
||||
* */
|
||||
* Same as callocN, clears memory and uses mmap (disk cached) if supported.
|
||||
* Can be free'd with MEM_freeN as usual.
|
||||
* */
|
||||
extern void *(*MEM_mapallocN)(size_t len,
|
||||
const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
|
||||
ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
|
||||
|
||||
/** Print a list of the names and sizes of all allocated memory
|
||||
* blocks. as a python dict for easy investigation */
|
||||
* blocks. as a python dict for easy investigation */
|
||||
extern void (*MEM_printmemlist_pydict)(void);
|
||||
|
||||
/** Print a list of the names and sizes of all allocated memory
|
||||
* blocks. */
|
||||
* blocks. */
|
||||
extern void (*MEM_printmemlist)(void);
|
||||
|
||||
/** calls the function on all allocated memory blocks. */
|
||||
@ -171,22 +171,22 @@ extern void (*MEM_printmemlist_stats)(void);
|
||||
extern void (*MEM_set_error_callback)(void (*func)(const char *));
|
||||
|
||||
/**
|
||||
* Are the start/end block markers still correct ?
|
||||
*
|
||||
* @retval true for correct memory, false for corrupted memory. */
|
||||
* Are the start/end block markers still correct ?
|
||||
*
|
||||
* @retval true for correct memory, false for corrupted memory. */
|
||||
extern bool (*MEM_consistency_check)(void);
|
||||
|
||||
/** Set thread locking functions for safe memory allocation from multiple
|
||||
* threads, pass NULL pointers to disable thread locking again. */
|
||||
* threads, pass NULL pointers to disable thread locking again. */
|
||||
extern void (*MEM_set_lock_callback)(void (*lock)(void), void (*unlock)(void));
|
||||
|
||||
/** Attempt to enforce OSX (or other OS's) to have malloc and stack nonzero */
|
||||
extern void (*MEM_set_memory_debug)(void);
|
||||
|
||||
/**
|
||||
* Memory usage stats
|
||||
* - MEM_get_memory_in_use is all memory
|
||||
* - MEM_get_mapped_memory_in_use is a subset of all memory */
|
||||
* Memory usage stats
|
||||
* - MEM_get_memory_in_use is all memory
|
||||
* - MEM_get_mapped_memory_in_use is a subset of all memory */
|
||||
extern size_t (*MEM_get_memory_in_use)(void);
|
||||
/** Get mapped memory usage. */
|
||||
extern size_t (*MEM_get_mapped_memory_in_use)(void);
|
||||
|
@ -106,8 +106,8 @@ typedef struct MemHead {
|
||||
int tag2;
|
||||
short mmap; /* if true, memory was mmapped */
|
||||
short alignment; /* if non-zero aligned alloc was used
|
||||
* and alignment is stored here.
|
||||
*/
|
||||
* and alignment is stored here.
|
||||
*/
|
||||
#ifdef DEBUG_MEMCOUNTER
|
||||
int _count;
|
||||
#endif
|
||||
|
@ -32,7 +32,7 @@
|
||||
# include "mmap_win.h"
|
||||
|
||||
# ifndef FILE_MAP_EXECUTE
|
||||
//not defined in earlier versions of the Platform SDK (before February 2003)
|
||||
// not defined in earlier versions of the Platform SDK (before February 2003)
|
||||
# define FILE_MAP_EXECUTE 0x0020
|
||||
# endif
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/* To compile run:
|
||||
* gcc -DWITH_GUARDEDALLOC -I../../ -I../../../atomic/ memtest.c ../../intern/mallocn.c -o simpletest
|
||||
* gcc -DWITH_GUARDEDALLOC -I../../ -I../../../atomic/ memtest.c ../../intern/mallocn.c -o memtest
|
||||
*/
|
||||
|
||||
/* Number of chunks to test with */
|
||||
|
@ -297,7 +297,7 @@ bool IK_QJacobianSolver::Solve(IK_QSegment *root,
|
||||
{
|
||||
float scale = ComputeScale();
|
||||
bool solved = false;
|
||||
//double dt = analyze_time();
|
||||
// double dt = analyze_time();
|
||||
|
||||
Scale(scale, tasks);
|
||||
|
||||
@ -359,7 +359,7 @@ bool IK_QJacobianSolver::Solve(IK_QSegment *root,
|
||||
|
||||
Scale(1.0f / scale, tasks);
|
||||
|
||||
//analyze_add_run(max_iterations, analyze_time()-dt);
|
||||
// analyze_add_run(max_iterations, analyze_time()-dt);
|
||||
|
||||
return solved;
|
||||
}
|
||||
|
@ -578,7 +578,7 @@ void IK_QSwingSegment::SetLimit(int axis, double lmin, double lmax)
|
||||
|
||||
// put center of ellispe in the middle between min and max
|
||||
double offset = 0.5 * (lmin + lmax);
|
||||
//lmax = lmax - offset;
|
||||
// lmax = lmax - offset;
|
||||
|
||||
if (axis == 0) {
|
||||
m_min[0] = -lmax;
|
||||
|
@ -32,11 +32,11 @@
|
||||
/**
|
||||
* An IK_Qsegment encodes information about a segments
|
||||
* local coordinate system.
|
||||
*
|
||||
*
|
||||
* These segments always point along the y-axis.
|
||||
*
|
||||
*
|
||||
* Here we define the local coordinates of a joint as
|
||||
* local_transform =
|
||||
* local_transform =
|
||||
* translate(tr1) * rotation(A) * rotation(q) * translate(0,length,0)
|
||||
* You can read this as:
|
||||
* - first translate by (0,length,0)
|
||||
|
@ -84,7 +84,7 @@ void bl_locale_set(const char *locale)
|
||||
// Specify location of dictionaries.
|
||||
gen.add_messages_path(messages_path);
|
||||
gen.add_messages_domain(default_domain);
|
||||
//gen.set_default_messages_domain(default_domain);
|
||||
// gen.set_default_messages_domain(default_domain);
|
||||
|
||||
try {
|
||||
if (locale && locale[0]) {
|
||||
@ -103,7 +103,8 @@ void bl_locale_set(const char *locale)
|
||||
|
||||
bl_locale_global_cache();
|
||||
|
||||
// Generate the locale string (useful to know which locale we are actually using in case of "default" one).
|
||||
// Generate the locale string
|
||||
// (useful to know which locale we are actually using in case of "default" one).
|
||||
#define LOCALE_INFO std::use_facet<boost::locale::info>(_locale)
|
||||
|
||||
locale_str = LOCALE_INFO.language();
|
||||
|
@ -496,9 +496,8 @@ int OCIOImpl::colorSpaceIsInvertible(OCIO_ConstColorSpaceRcPtr *cs_)
|
||||
const char *family = (*cs)->getFamily();
|
||||
|
||||
if (!strcmp(family, "rrt") || !strcmp(family, "display")) {
|
||||
/* assume display and rrt transformations are not invertible
|
||||
* in fact some of them could be, but it doesn't make much sense to allow use them as invertible
|
||||
*/
|
||||
/* assume display and rrt transformations are not invertible in fact some of them could be,
|
||||
* but it doesn't make much sense to allow use them as invertible. */
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -508,7 +507,8 @@ int OCIOImpl::colorSpaceIsInvertible(OCIO_ConstColorSpaceRcPtr *cs_)
|
||||
}
|
||||
|
||||
if ((*cs)->getTransform(COLORSPACE_DIR_TO_REFERENCE)) {
|
||||
/* if there's defined transform to reference space, color space could be converted to scene linear */
|
||||
/* if there's defined transform to reference space,
|
||||
* color space could be converted to scene linear. */
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -70,8 +70,8 @@ typedef struct OCIO_GLSLShader {
|
||||
|
||||
/* LUT */
|
||||
bool lut3d_texture_allocated; /* boolean flag indicating whether
|
||||
* lut texture is allocated
|
||||
*/
|
||||
* lut texture is allocated
|
||||
*/
|
||||
bool lut3d_texture_valid;
|
||||
|
||||
GLuint lut3d_texture; /* OGL texture ID for 3D LUT */
|
||||
|
Loading…
Reference in New Issue
Block a user