opencv: Remove uneeded buffer writability check
When set to in_place, the BaseTransform class will guaranty that buffers passed to transform_ip() function are writable. https://bugzilla.gnome.org/show_bug.cgi?id=775378
This commit is contained in:
parent
f7b039e7df
commit
831735fc1c
@ -590,19 +590,10 @@ gst_face_detect_transform_ip (GstOpencvVideoFilter * base, GstBuffer * buf,
|
|||||||
vector < Rect > mouth;
|
vector < Rect > mouth;
|
||||||
vector < Rect > nose;
|
vector < Rect > nose;
|
||||||
vector < Rect > eyes;
|
vector < Rect > eyes;
|
||||||
gboolean do_display = FALSE;
|
|
||||||
gboolean post_msg = FALSE;
|
gboolean post_msg = FALSE;
|
||||||
|
|
||||||
Mat mtxOrg (cv::cvarrToMat (img));
|
Mat mtxOrg (cv::cvarrToMat (img));
|
||||||
|
|
||||||
if (filter->display) {
|
|
||||||
if (gst_buffer_is_writable (buf)) {
|
|
||||||
do_display = TRUE;
|
|
||||||
} else {
|
|
||||||
GST_LOG_OBJECT (filter, "Buffer is not writable, not drawing faces.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cvCvtColor (img, filter->cvGray, CV_RGB2GRAY);
|
cvCvtColor (img, filter->cvGray, CV_RGB2GRAY);
|
||||||
|
|
||||||
gst_face_detect_run_detector (filter, filter->cvFaceDetect,
|
gst_face_detect_run_detector (filter, filter->cvFaceDetect,
|
||||||
@ -719,7 +710,7 @@ gst_face_detect_transform_ip (GstOpencvVideoFilter * base, GstBuffer * buf,
|
|||||||
s = NULL;
|
s = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_display) {
|
if (filter->display) {
|
||||||
CvPoint center;
|
CvPoint center;
|
||||||
Size axes;
|
Size axes;
|
||||||
gdouble w, h;
|
gdouble w, h;
|
||||||
|
@ -857,7 +857,6 @@ gst_motion_cells_transform_ip (GstOpencvVideoFilter * base, GstBuffer * buf,
|
|||||||
cellscolor motioncellscolor;
|
cellscolor motioncellscolor;
|
||||||
motioncellidx *motioncellsidx;
|
motioncellidx *motioncellsidx;
|
||||||
|
|
||||||
buf = gst_buffer_make_writable (buf);
|
|
||||||
if (filter->firstframe) {
|
if (filter->firstframe) {
|
||||||
setPrevFrame (img, filter->id);
|
setPrevFrame (img, filter->id);
|
||||||
filter->firstframe = FALSE;
|
filter->firstframe = FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user