Add missing update_function_pointers so that we use SSE blend functions. Significantly reduces cpu use in motion detection.

This commit is contained in:
Isaac Connor 2021-09-13 15:03:36 -04:00
parent 4b4152b837
commit 6dbfd22190
1 changed files with 3 additions and 0 deletions

View File

@ -313,6 +313,7 @@ bool Image::Assign(const AVFrame *frame, SwsContext *convert_context, AVFrame *t
return false;
}
zm_dump_video_frame(temp_frame, "dest frame after convert");
update_function_pointers();
return true;
} // end Image::Assign(const AVFrame *frame, SwsContext *convert_context, AVFrame *temp_frame)
@ -687,6 +688,7 @@ void Image::AssignDirect(
subpixelorder = p_subpixelorder;
pixels = width * height;
size = new_buffer_size;
update_function_pointers();
} // end void Image::AssignDirect
void Image::Assign(
@ -788,6 +790,7 @@ void Image::Assign(const Image &image) {
linesize = image.linesize;
}
update_function_pointers();
if ( image.buffer != buffer )
(*fptr_imgbufcpy)(buffer, image.buffer, size);
}