Merge various small changes from render branch:
* Division by zero fix for TNT SVD code. * Sound fix, in case ffmpeg decode fails, don't use the samples. * Fix for incorrect bounds of transformed objects in new raytracing code. * Gave memory arena's a name used for allocations for easier memory usage debugging. * Dupligroup no_draw option was using layers but not restrict view/render setting. (not a bugfix exactly but would do display list context switching while drawing for no reason). * Fix objects instanced on hair particles not giving consistent results when the object is transformed. * New math functions: madd_v4_v4fl, len_squared_v3v3, interp_v4_v4v4v4, mul_v4_m4v4, SH and form factor functions, box_minmax_bounds_m4. * mul_m4_m4m4 and mul_m3_m3m3 now accept the same pointers for multiple arguments. * endjob callback for WM jobs system. * Geometry node uv/color layer now has search list/autocomplete. * Various small buildsystem tweaks, not strictly needed yet in trunk.
This commit is contained in:
@@ -67,12 +67,12 @@ int AUD_FFMPEGReader::decode(AVPacket* packet, AUD_Buffer* buffer)
|
||||
audio_pkg_data,
|
||||
audio_pkg_size);
|
||||
|
||||
buf_pos += data_size;
|
||||
|
||||
// read error, next packet!
|
||||
if(read_length < 0)
|
||||
break;
|
||||
|
||||
buf_pos += data_size;
|
||||
|
||||
// move packet parameters
|
||||
audio_pkg_data += read_length;
|
||||
audio_pkg_size -= read_length;
|
||||
|
@@ -349,8 +349,9 @@ void SVD(MaTRiX &A, MaTRiX &U, VecToR &s, MaTRiX &V, VecToR &work1, VecToR &work
|
||||
|
||||
for (j = k; j < p-1; j++) {
|
||||
typename MaTRiX::value_type t = hypot(f,g);
|
||||
typename MaTRiX::value_type cs = f/t;
|
||||
typename MaTRiX::value_type sn = g/t;
|
||||
/* division by zero checks added to avoid NaN (brecht) */
|
||||
typename MaTRiX::value_type cs = (t == 0.0f)? 0.0f: f/t;
|
||||
typename MaTRiX::value_type sn = (t == 0.0f)? 0.0f: g/t;
|
||||
if (j != k) {
|
||||
e[j-1] = t;
|
||||
}
|
||||
@@ -366,8 +367,9 @@ void SVD(MaTRiX &A, MaTRiX &U, VecToR &s, MaTRiX &V, VecToR &work1, VecToR &work
|
||||
}
|
||||
|
||||
t = hypot(f,g);
|
||||
cs = f/t;
|
||||
sn = g/t;
|
||||
/* division by zero checks added to avoid NaN (brecht) */
|
||||
cs = (t == 0.0f)? 0.0f: f/t;
|
||||
sn = (t == 0.0f)? 0.0f: g/t;
|
||||
s[j] = t;
|
||||
f = cs*e[j] + sn*s[j+1];
|
||||
s[j+1] = -sn*e[j] + cs*s[j+1];
|
||||
|
Reference in New Issue
Block a user