camera: match resolutions close to 32x32 blocks (when re-using)

This commit is contained in:
Kamil Trzcinski 2023-02-22 21:49:06 +01:00
parent aef3a7300a
commit 10545b6b7a

View File

@ -12,9 +12,11 @@
#include "output/rtsp/rtsp.h"
#include "output/output.h"
#define MATCH_ALIGN_SIZE 32
static bool camera_output_matches_capture(buffer_list_t *capture, unsigned target_height, unsigned format)
{
if (target_height && capture->fmt.height != target_height && capture->fmt.height != camera_rescaller_align_size(target_height)) {
if (target_height && (capture->fmt.height / MATCH_ALIGN_SIZE) != (target_height / MATCH_ALIGN_SIZE)) {
return false;
}