double fx, fy, cx, cy;
double inv_fx, inv_fy, cx_fx, cy_fy;
public:
- ap3p() {}
+ ap3p() : fx(0), fy(0), cx(0), cy(0), inv_fx(0), inv_fy(0), cx_fx(0), cy_fy(0) {}
ap3p(double fx, double fy, double cx, double cy);
{
const int nr = A->rows;
const int nc = A->cols;
+ if (nc <= 0 || nr <= 0)
+ return;
if (max_nr != 0 && max_nr < nr)
{
{
const int nr = A->rows;
const int nc = A->cols;
+ if (nr <= 0 || nc <= 0)
+ return;
if (max_nr != 0 && max_nr < nr)
{
#endif
#include "opencv2/core/cvdef.h"
-
#include <cstddef>
#include <cstring>
#include <cctype>
inline
String String::toLowerCase() const
{
+ if (!cstr_)
+ return String();
String res(cstr_, len_);
-
for (size_t i = 0; i < len_; ++i)
res.cstr_[i] = (char) ::tolower(cstr_[i]);
{
if( normType == NORM_INF )
for( i = 0; i < N; i++, ++it )
+ {
+ CV_Assert(it.ptr);
result = std::max(result, std::abs((double)it.value<float>()));
+ }
else if( normType == NORM_L1 )
for( i = 0; i < N; i++, ++it )
+ {
+ CV_Assert(it.ptr);
result += std::abs(it.value<float>());
+ }
else
for( i = 0; i < N; i++, ++it )
{
+ CV_Assert(it.ptr);
double v = it.value<float>();
result += v*v;
}
{
if( normType == NORM_INF )
for( i = 0; i < N; i++, ++it )
+ {
+ CV_Assert(it.ptr);
result = std::max(result, std::abs(it.value<double>()));
+ }
else if( normType == NORM_L1 )
for( i = 0; i < N; i++, ++it )
+ {
+ CV_Assert(it.ptr);
result += std::abs(it.value<double>());
+ }
else
for( i = 0; i < N; i++, ++it )
{
+ CV_Assert(it.ptr);
double v = it.value<double>();
result += v*v;
}
float minval = FLT_MAX, maxval = -FLT_MAX;
for( i = 0; i < N; i++, ++it )
{
+ CV_Assert(it.ptr);
float v = it.value<float>();
if( v < minval )
{
double minval = DBL_MAX, maxval = -DBL_MAX;
for( i = 0; i < N; i++, ++it )
{
+ CV_Assert(it.ptr);
double v = it.value<double>();
if( v < minval )
{
ParallelConv()
: input_(0), weights_(0), output_(0), ngroups_(0), nstripes_(0),
- is1x1_(false), useAVX2(false)
+ biasvec_(0), reluslope_(0), activ_(0), is1x1_(false), useAVX2(false)
{}
static void run( const Mat& input, Mat& output, const Mat& weights,
int nstripes;
const ActivationLayer* activ;
- EltwiseInvoker() {}
+ EltwiseInvoker() : srcs(0), nsrcs(0), dst(0), coeffs(0), op(EltwiseLayer::PROD), nstripes(0), activ(0) {}
static void run(const Mat** srcs, int nsrcs, Mat& dst,
const std::vector<int>& coeffs, EltwiseOp op,
class FullyConnected : public ParallelLoopBody
{
public:
- FullyConnected() {}
+ FullyConnected() : srcMat(0), weights(0), biasMat(0), activ(0), dstMat(0), nstripes(0), useAVX2(false) {}
static void run(const Mat& srcMat, const Mat& weights, const Mat& biasMat,
Mat& dstMat, const ActivationLayer* activ, int nstripes)
parallel_for_(Range(0, nstripes), p, nstripes);
}
- PermuteInvoker() {}
+ PermuteInvoker() : inp(0), out(0), order(0), nstripes(0) {}
void operator()(const Range& r) const
{
std::vector<int> ofsbuf;
int poolingType;
- PoolingInvoker() {}
+ PoolingInvoker() : src(0), dst(0), mask(0), nstripes(0), computeMaxIdx(0), poolingType(PoolingLayer::MAX) {}
static void run(const Mat& src, Mat& dst, Mat& mask, Size kernel,
Size stride, Size pad, int poolingType,
}
v_store(dstData + x0, max_val0);
v_store(dstData + x0 + 4, max_val1);
- v_store(dstMaskData + x0, max_idx0);
- v_store(dstMaskData + x0 + 4, max_idx1);
+ if (dstMaskData)
+ {
+ v_store(dstMaskData + x0, max_idx0);
+ v_store(dstMaskData + x0 + 4, max_idx1);
+ }
x0 += 7;
}
else
}
dstData[x0] = max_val;
- dstMaskData[x0] = max_index;
+ if (dstMaskData)
+ dstMaskData[x0] = max_index;
}
else
{
{
int big_endian = !THDiskFile_isLittleEndianCPU();
int32_t *buffer = (int32_t*)THAlloc(8*n);
+ if (!buffer)
+ THError("can not allocate buffer");
nread = fread__(buffer, 8, n, dfself->handle);
long i;
for(i = nread; i > 0; i--)
total += TBRS_BSZ;
p = (char*)THRealloc(p, total);
}
+ if (p == NULL)
+ THError("read error: failed to allocate buffer");
pos += fread(p+pos, 1, total-pos, dfself->handle);
if (pos < total) /* eof? */
{
}
self = (THDiskFile*)THAlloc(sizeof(THDiskFile));
+ if (!self)
+ THError("cannot allocate memory for self");
self->handle = handle;
self->name = (char*)THAlloc(strlen(name)+1);
+ if (!self->name)
+ THError("cannot allocate memory for self->name");
strcpy(self->name, name);
self->isNativeEncoding = 1;
self->longSize = 0;
const BriskShortPair* max = shortPairs_ + noShortPairs_;
for (BriskShortPair* iter = shortPairs_; iter < max; ++iter)
{
+ CV_Assert(iter->i < points_ && iter->j < points_);
t1 = *(_values + iter->i);
t2 = *(_values + iter->j);
if (t1 > t2)
{
m_start = m_end = m_current = 0;
m_file = 0;
+ m_block_pos = 0;
m_block_size = BS_DEF_BLOCK_SIZE;
m_is_opened = false;
m_buf = 0;
return cvEndWriteSeq( &writer );
}
+ reader.code = 0;
cvStartReadChainPoints( chain, &reader );
temp.next = 0;
{
int b = src[bidx], g = src[1], r = src[bidx^2];
int h, s, v = b;
- int vmin = b, diff;
+ int vmin = b;
int vr, vg;
CV_CALC_MAX_8U( v, g );
CV_CALC_MIN_8U( vmin, g );
CV_CALC_MIN_8U( vmin, r );
- diff = v - vmin;
+ uchar diff = saturate_cast<uchar>(v - vmin);
vr = v == r ? -1 : 0;
vg = v == g ? -1 : 0;
else
{
i3 = i0;
- CV_Assert(i3 != NULL);
prev_s = s ^ 4;
/* follow border */
for( ;; )
{
+ CV_Assert(i3 != NULL);
s_end = s;
s = std::min(s, MAX_SIZE - 1);
while( *i1 == 0 && s != s_end );
i3 = i0;
- CV_Assert(i3 != NULL);
/* check single pixel domain */
if( s != s_end )
/* follow border */
for( ;; )
{
+ CV_Assert(i3 != NULL);
s = std::min(s, MAX_SIZE - 1);
while( s < MAX_SIZE - 1 )
/* follow border */
for( ;; )
{
+ CV_Assert(i3 != NULL);
s_end = s;
s = std::min(s, MAX_SIZE - 1);
while( s < MAX_SIZE - 1 )
{
i4 = i3 + deltas[++s];
+ CV_Assert(i4 != NULL);
if( *i4 != 0 )
break;
}
static int
icvTraceContour_32s( int *ptr, int step, int *stop_ptr, int is_hole )
{
+ CV_Assert(ptr != NULL);
int deltas[MAX_SIZE];
int *i0 = ptr, *i1, *i3, *i4 = NULL;
int s, s_end;
/* follow border */
for( ;; )
{
+ CV_Assert(i3 != NULL);
s_end = s;
s = std::min(s, MAX_SIZE - 1);
while( s < MAX_SIZE - 1 )
{
i4 = i3 + deltas[++s];
+ CV_Assert(i4 != NULL);
if( (*i4 & value_mask) == ccomp_val )
break;
}
int _method,
CvRect* _rect )
{
+ CV_Assert(ptr != NULL);
int deltas[MAX_SIZE];
CvSeqWriter writer;
int *i0 = ptr, *i1, *i3, *i4;
/* follow border */
for( ;; )
{
+ CV_Assert(i3 != NULL);
s_end = s;
do
{
i4 = i3 + deltas[++s];
+ CV_Assert(i4 != NULL);
}
while( (*i4 & value_mask) != ccomp_val && ( s < MAX_SIZE - 1 ) );
s &= 7;
hull = cvMakeSeqHeaderForArray(
CV_SEQ_KIND_CURVE|CV_MAT_TYPE(mat->type)|CV_SEQ_FLAG_CLOSED,
- sizeof(CvContour), CV_ELEM_SIZE(mat->type), mat->data.ptr,
+ sizeof(hull_header), CV_ELEM_SIZE(mat->type), mat->data.ptr,
mat->cols + mat->rows - 1, &hull_header, &hullblock );
}
int t = *(int*)hull_reader.ptr;
hull_next = CV_GET_SEQ_ELEM( CvPoint, ptseq, t );
}
+ CV_Assert(hull_next != NULL && hull_cur != NULL);
dx0 = (double)hull_next->x - (double)hull_cur->x;
dy0 = (double)hull_next->y - (double)hull_cur->y;
void* clr = (contour->flags & CV_SEQ_FLAG_HOLE) == 0 ? ext_buf : hole_buf;
cvStartReadSeq( contour, &reader, 0 );
+ CV_Assert(reader.ptr != NULL);
if( thickness < 0 )
pts.resize(0);
int i, j;
float min_val = CV_EMD_INF;
int steps;
- CvNode2D head, *cur_x, *next_x, *leave_x = 0;
+ CvNode2D head = {0, {0}, 0, 0}, *cur_x, *next_x, *leave_x = 0;
CvNode2D *enter_x = state->enter_x;
CvNode2D **loop = state->loop;
while( (next_x = cur_x->next[0]) != leave_x )
{
cur_x = next_x;
- assert( cur_x );
+ CV_Assert( cur_x );
}
cur_x->next[0] = next_x->next[0];
state->rows_x[i] = head.next[0];
while( (next_x = cur_x->next[1]) != leave_x )
{
cur_x = next_x;
- assert( cur_x );
+ CV_Assert( cur_x );
}
cur_x->next[1] = next_x->next[1];
state->cols_x[j] = head.next[1];
}
}
}
- else
+ else if (ranges)
{
for( i = 0; i < dims; i++ )
{
}
}
}
+ else
+ {
+ CV_Error(Error::StsBadArg, "Either ranges, either uniform ranges should be provided");
+ }
}
}
}
}
- else
+ else if (_ranges)
{
// non-uniform histogram
const float* ranges[CV_MAX_DIM];
ptrs[i] += deltas[i*2 + 1];
}
}
+ else
+ {
+ CV_Error(Error::StsBadArg, "Either ranges, either uniform ranges should be provided");
+ }
}
if(histdata != hist.data)
accumulate = false;
- CV_IPP_RUN(nimages == 1 && dims == 1 && channels && channels[0] == 0 && _mask.empty() && images[0].dims <= 2,
- ipp_calchist(images[0], hist, histSize[0], ranges, uniform, accumulate));
+ CV_IPP_RUN(
+ nimages == 1 && dims == 1 && channels && channels[0] == 0
+ && _mask.empty() && images[0].dims <= 2 && ranges && ranges[0],
+ ipp_calchist(images[0], hist, histSize[0], ranges, uniform, accumulate));
Mat ihist = hist;
ihist.flags = (ihist.flags & ~CV_MAT_TYPE_MASK)|CV_32S;
ptrs[i] += deltas[i*2 + 1];
}
}
- else
+ else if (_ranges)
{
// non-uniform histogram
const float* ranges[CV_MAX_DIM];
ptrs[i] += deltas[i*2 + 1];
}
}
+ else
+ {
+ CV_Error(Error::StsBadArg, "Either ranges, either uniform ranges should be provided");
+ }
}
SparseMatIterator it = hist.begin();
for( i = 0, N = hist.nzcount(); i < N; i++, ++it )
{
+ CV_Assert(it.ptr != NULL);
Cv32suf* val = (Cv32suf*)it.ptr;
val->i = cvRound(val->f);
}
SparseMatIterator it = hist.begin();
for( i = 0, N = hist.nzcount(); i < N; i++, ++it )
{
+ CV_Assert(it.ptr != NULL);
Cv32suf* val = (Cv32suf*)it.ptr;
val->f = (float)val->i;
}
}
}
}
- else
+ else if (_ranges)
{
// non-uniform histogram
const float* ranges[CV_MAX_DIM];
ptrs[i] += deltas[i*2 + 1];
}
}
+ else
+ {
+ CV_Error(Error::StsBadArg, "Either ranges, either uniform ranges should be provided");
+ }
}
ptrs[i] += deltas[i*2 + 1];
}
}
- else
+ else if (_ranges)
{
// non-uniform histogram
const float* ranges[CV_MAX_DIM];
ptrs[i] += deltas[i*2 + 1];
}
}
+ else
+ {
+ CV_Error(Error::StsBadArg, "Either ranges, either uniform ranges should be provided");
+ }
}
dims, hist.hdr->size, ranges,
uniform, ptrs, deltas, imsize, uniranges );
const double* _uniranges = uniform ? &uniranges[0] : 0;
-
int depth = images[0].depth();
if( depth == CV_8U )
calcSparseBackProj_8u(ptrs, deltas, imsize, hist, dims, ranges,
std::swap(PH1, PH2);
SparseMatConstIterator it = PH1->begin();
+
int N1 = (int)PH1->nzcount(), N2 = (int)PH2->nzcount();
if( (method == CV_COMP_CHISQR) || (method == CV_COMP_CHISQR_ALT) )
{
for( i = 0; i < N1; i++, ++it )
{
+ CV_Assert(it.ptr != NULL);
float v1 = it.value<float>();
const SparseMat::Node* node = it.node();
float v2 = PH2->value<float>(node->idx, (size_t*)&node->hashval);
for( i = 0; i < N1; i++, ++it )
{
+ CV_Assert(it.ptr != NULL);
double v1 = it.value<float>();
const SparseMat::Node* node = it.node();
s12 += v1*PH2->value<float>(node->idx, (size_t*)&node->hashval);
it = PH2->begin();
for( i = 0; i < N2; i++, ++it )
{
+ CV_Assert(it.ptr != NULL);
double v2 = it.value<float>();
s2 += v2;
s22 += v2*v2;
{
for( i = 0; i < N1; i++, ++it )
{
+ CV_Assert(it.ptr != NULL);
float v1 = it.value<float>();
const SparseMat::Node* node = it.node();
float v2 = PH2->value<float>(node->idx, (size_t*)&node->hashval);
for( i = 0; i < N1; i++, ++it )
{
+ CV_Assert(it.ptr != NULL);
double v1 = it.value<float>();
const SparseMat::Node* node = it.node();
double v2 = PH2->value<float>(node->idx, (size_t*)&node->hashval);
it = PH2->begin();
for( i = 0; i < N2; i++, ++it )
+ {
+ CV_Assert(it.ptr != NULL);
s2 += it.value<float>();
+ }
s1 *= s2;
s1 = fabs(s1) > FLT_EPSILON ? 1./std::sqrt(s1) : 1.;
{
for( i = 0; i < N1; i++, ++it )
{
+ CV_Assert(it.ptr != NULL);
double v1 = it.value<float>();
const SparseMat::Node* node = it.node();
double v2 = PH2->value<float>(node->idx, (size_t*)&node->hashval);
cv::SparseMatConstIterator it = sH.begin();
int nz = (int)sH.nzcount();
for( i = 0; i < nz; i++, ++it )
+ {
+ CV_Assert(it.ptr != NULL);
*(float*)cvPtrND(sparsemat, it.node()->idx, 0, -2) = (float)*(const int*)it.ptr;
+ }
}
}
if( j_scalar < roi.width )
{
const int thresh_pivot = thresh + 1;
- uchar tab[256];
+ uchar tab[256] = {0};
switch( type )
{
case THRESH_BINARY:
double _x = i*ir[1] + ir[2], _y = i*ir[4] + ir[5], _w = i*ir[7] + ir[8];
int j = 0;
+
+ if (m1type == CV_16SC2)
+ CV_Assert(m1 != NULL && m2 != NULL);
+ else if (m1type == CV_32FC1)
+ CV_Assert(m1f != NULL && m2f != NULL);
+ else
+ CV_Assert(m1 != NULL);
+
#if CV_AVX2
if( USE_AVX2 )
{
(((const CvHaarClassifierCascade*)(haar))->flags & CV_MAGIC_MASK)==CV_HAAR_MAGIC_VAL)
#define CV_HAAR_FEATURE_MAX 3
+#define CV_HAAR_STAGE_MAX 1000
typedef struct CvHaarFeature
{
&& trackingDetector );
if (mainDetector) {
- separateDetectionWork.reset(new SeparateDetectionWork(*this, mainDetector, params));
+ Ptr<SeparateDetectionWork> tmp(new SeparateDetectionWork(*this, mainDetector, params));
+ separateDetectionWork.swap(tmp);
}
weightsPositionsSmoothing.push_back(1);
sscanf( stage, "%d%n", &count, &dl );
stage += dl;
- assert( count > 0 );
+ CV_Assert( count > 0 && count < CV_HAAR_STAGE_MAX);
cascade->stage_classifier[i].count = count;
cascade->stage_classifier[i].classifier =
(CvHaarClassifier*)cvAlloc( count*sizeof(cascade->stage_classifier[i].classifier[0]));
sscanf( stage, "%d%n", &classifier->count, &dl );
stage += dl;
+ CV_Assert( classifier->count > 0 && classifier->count< CV_HAAR_STAGE_MAX);
classifier->haar_feature = (CvHaarFeature*) cvAlloc(
classifier->count * ( sizeof( *classifier->haar_feature ) +
sizeof( *classifier->threshold ) +
sscanf( stage, "%d%n", &rects, &dl );
stage += dl;
- assert( rects >= 2 && rects <= CV_HAAR_FEATURE_MAX );
+ CV_DbgAssert( rects >= 2 && rects <= CV_HAAR_FEATURE_MAX );
for( k = 0; k < rects; k++ )
{
stage += dl;
classifier->haar_feature[l].rect[k].r = r;
}
- sscanf( stage, "%s%n", str, &dl );
+ sscanf( stage, "%99s%n", str, &dl );
stage += dl;
classifier->haar_feature[l].tilted = strncmp( str, "tilted", 6 ) == 0;
}
stage += dl;
+ CV_Assert(parent >= 0 && parent < i);
cascade->stage_classifier[i].parent = parent;
cascade->stage_classifier[i].next = next;
cascade->stage_classifier[i].child = -1;
String eerr("version?");
String efile(__FILE__);
String efunc(__FUNCTION__);
+ fclose(modelfl);
+
throw Exception(Error::StsError, eerr, efile, efunc, __LINE__);
}
if(strcmp(version_buffer,"V6.01")) {
String eerr("version doesnot match");
String efile(__FILE__);
String efunc(__FUNCTION__);
+ fclose(modelfl);
+
throw Exception(Error::StsError, eerr, efile, efunc, __LINE__);
}
/* read version number */
int version = 0;
if (!fread (&version,sizeof(int),1,modelfl))
- { throw Exception(); }
+ {
+ fclose(modelfl);
+ throw Exception();
+ }
if (version < 200)
{
String eerr("version doesnot match");
String efile(__FILE__);
String efunc(__FUNCTION__);
+ fclose(modelfl);
throw Exception();
}
int kernel_type;
nread=fread(&(coef_const),sizeof(double),1,modelfl);
int l;
nread=fread(&l,sizeof(int),1,modelfl);
+ CV_Assert(l >= 0 && l < 0xFFFF);
char* custom = new char[l];
nread=fread(custom,sizeof(char),l,modelfl);
delete[] custom;
detector.clear();
if(kernel_type == 0) { /* linear kernel */
/* save linear wts also */
+ CV_Assert(totwords + 1 > 0 && totwords < 0xFFFF);
double *linearwt = new double[totwords+1];
int length = totwords;
nread = fread(linearwt, sizeof(double), totwords + 1, modelfl);
if(nread != static_cast<size_t>(length) + 1) {
delete [] linearwt;
+ fclose(modelfl);
throw Exception();
}
setSVMDetector(detector);
delete [] linearwt;
} else {
+ fclose(modelfl);
throw Exception();
}
fclose(modelfl);
template <typename T, typename IT, typename WT>
static inline void incWithWeight(IT* estimation, IT* weights_sum, WT weight, T p)
{
- return incWithWeight_<T, IT, WT>::f(estimation, weights_sum, weight, p);
+ incWithWeight_<T, IT, WT>::f(estimation, weights_sum, weight, p);
}
template <typename IT, typename UIT, int nc, int nw> struct divByWeightsSum_
template <typename IT, typename UIT, int nc, int nw>
static inline void divByWeightsSum(IT* estimation, IT* weights_sum)
{
- return divByWeightsSum_<IT, UIT, nc, nw>::f(estimation, weights_sum);
+ divByWeightsSum_<IT, UIT, nc, nw>::f(estimation, weights_sum);
}
template <typename T, typename IT> struct saturateCastFromArray_
void ImplMutex::init()
{
- impl = (Impl*)malloc(sizeof(Impl));
+ impl = new Impl();
impl->init();
}
void ImplMutex::destroy()
{
impl->destroy();
- free(impl);
+ delete(impl);
impl = NULL;
}
void ImplMutex::lock() { impl->lock(); }
static AVFrame * icv_alloc_picture_FFMPEG(int pix_fmt, int width, int height, bool alloc)
{
AVFrame * picture;
- uint8_t * picture_buf;
+ uint8_t * picture_buf = 0;
int size;
#if LIBAVCODEC_BUILD >= (LIBAVCODEC_VERSION_MICRO >= 100 \
}
else {
}
+
return picture;
}
best= p;
}
}
+ if (best == NULL)
+ return NULL;
c->time_base.den= best->num;
c->time_base.num= best->den;
}
av_free(outbuf);
- if (!(fmt->flags & AVFMT_NOFILE))
+ if (oc)
{
- /* close the output file */
+ if (!(fmt->flags & AVFMT_NOFILE))
+ {
+ /* close the output file */
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(123<<8)+0)
#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(49<<8)+0)
- url_fclose(oc->pb);
+ url_fclose(oc->pb);
#else
- url_fclose(&oc->pb);
+ url_fclose(&oc->pb);
#endif
#else
- avio_close(oc->pb);
+ avio_close(oc->pb);
#endif
- }
+ }
- /* free the stream */
- avformat_free_context(oc);
+ /* free the stream */
+ avformat_free_context(oc);
+ }
av_freep(&aligned_input);
CvCapture_FFMPEG* cvCreateFileCapture_FFMPEG( const char* filename )
{
CvCapture_FFMPEG* capture = (CvCapture_FFMPEG*)malloc(sizeof(*capture));
+ if (!capture)
+ return 0;
capture->init();
if( capture->open( filename ))
return capture;
int width, int height, int isColor )
{
CvVideoWriter_FFMPEG* writer = (CvVideoWriter_FFMPEG*)malloc(sizeof(*writer));
+ if (!writer)
+ return 0;
writer->init();
if( writer->open( filename, fourcc, fps, width, height, isColor != 0 ))
return writer;
}
}
+ if (best == NULL)
+ return NULL;
c->time_base.den= best->num;
c->time_base.num= best->den;
}
struct OutputMediaStream_FFMPEG* create_OutputMediaStream_FFMPEG(const char* fileName, int width, int height, double fps)
{
OutputMediaStream_FFMPEG* stream = (OutputMediaStream_FFMPEG*) malloc(sizeof(OutputMediaStream_FFMPEG));
+ if (!stream)
+ return 0;
if (stream->open(fileName, width, height, fps))
return stream;
InputMediaStream_FFMPEG* create_InputMediaStream_FFMPEG(const char* fileName, int* codec, int* chroma_format, int* width, int* height)
{
InputMediaStream_FFMPEG* stream = (InputMediaStream_FFMPEG*) malloc(sizeof(InputMediaStream_FFMPEG));
+ if (!stream)
+ return 0;
if (stream && stream->open(fileName, codec, chroma_format, width, height))
return stream;
{
m_is_indx_present = ((avi_hdr.dwFlags & 0x10) != 0);
DWORD number_of_streams = avi_hdr.dwStreams;
+ CV_Assert(number_of_streams < 0xFF);
m_width = avi_hdr.dwWidth;
m_height = avi_hdr.dwHeight;