1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2021-12-03 12:32:49 +00:00
89 changed files with 1116 additions and 542 deletions
+4 -5
View File
@@ -47,7 +47,6 @@ using namespace cv;
#if !(defined(_WIN32) || defined(WINCE))
# include <pthread.h>
#endif
#include <assert.h>
#include <algorithm>
#include <limits>
@@ -400,7 +399,7 @@ static
inline int _opencv_ffmpeg_interrupt_callback(void *ptr)
{
AVInterruptCallbackMetadata* metadata = (AVInterruptCallbackMetadata*)ptr;
assert(metadata);
CV_Assert(metadata);
if (metadata->timeout_after_ms == 0)
{
@@ -2165,7 +2164,7 @@ bool CvVideoWriter_FFMPEG::writeFrame( const unsigned char* data, int step, int
}
}
else {
assert(false);
CV_Assert(false);
}
if( (width & -2) != frame_width || (height & -2) != frame_height || !data )
@@ -2218,7 +2217,7 @@ bool CvVideoWriter_FFMPEG::writeFrame( const unsigned char* data, int step, int
sw_pix_fmt = ((AVHWFramesContext*)c->hw_frames_ctx->data)->sw_format;
#endif
if ( sw_pix_fmt != input_pix_fmt ) {
assert( input_picture );
CV_Assert( input_picture );
// let input_picture point to the raw data buffer of 'image'
_opencv_ffmpeg_av_image_fill_arrays(input_picture, (uint8_t *) data,
(AVPixelFormat)input_pix_fmt, width, height);
@@ -2592,7 +2591,7 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc,
// alloc memory for context
oc = avformat_alloc_context();
assert (oc);
CV_Assert(oc);
/* set file name */
oc->oformat = fmt;
+2 -3
View File
@@ -220,7 +220,6 @@ make & enjoy!
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <limits>
@@ -938,8 +937,8 @@ bool CvCaptureCAM_V4L::read_frame_v4l2()
return false;
}
assert(buf.index < req.count);
assert(buffers[buf.index].length == buf.length);
CV_Assert(buf.index < req.count);
CV_Assert(buffers[buf.index].length == buf.length);
//We shouldn't use this buffer in the queue while not retrieve frame from it.
buffers[buf.index].buffer = buf;
-1
View File
@@ -82,7 +82,6 @@
#include <string.h>
#include <limits.h>
#include <ctype.h>
#include <assert.h> // FIXIT remove this
#if defined _WIN32 || defined WINCE
#if !defined _WIN32_WINNT