V plane is actually the 3rd array entry, not the 4th
This commit is contained in:
parent
bd68b9e3af
commit
fd7f7f851a
|
@ -2020,7 +2020,7 @@ bool Monitor::Analyse() {
|
|||
) ) {
|
||||
Debug(1, "assigning refimage from v-channel");
|
||||
Image v_image(snap->in_frame->width,
|
||||
snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[3], 0);
|
||||
snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[2], 0);
|
||||
ref_image.Assign(v_image);
|
||||
} else if (snap->image) {
|
||||
Debug(1, "assigning refimage from snap->image");
|
||||
|
@ -2110,7 +2110,7 @@ bool Monitor::Analyse() {
|
|||
((AVPixelFormat)snap->in_frame->format == AV_PIX_FMT_YUVJ420P)
|
||||
) ) {
|
||||
Debug(1, "assigning refimage from v-channel");
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[3], 0);
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[2], 0);
|
||||
ref_image.Assign(v_image);
|
||||
} else {
|
||||
Debug(1, "assigning refimage from snap->image");
|
||||
|
@ -2125,7 +2125,7 @@ bool Monitor::Analyse() {
|
|||
||
|
||||
((AVPixelFormat)snap->in_frame->format == AV_PIX_FMT_YUVJ420P)
|
||||
) ) {
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[3], 0);
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[2], 0);
|
||||
snap->score = DetectMotion(v_image, zoneSet);
|
||||
} else {
|
||||
snap->score = DetectMotion(*(snap->image), zoneSet);
|
||||
|
@ -2350,7 +2350,7 @@ bool Monitor::Analyse() {
|
|||
((AVPixelFormat)snap->in_frame->format == AV_PIX_FMT_YUVJ420P)
|
||||
) ) {
|
||||
Debug(1, "Assigning from vchannel");
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[3], 0);
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[2], 0);
|
||||
ref_image.Assign(v_image);
|
||||
} else if (snap->image) {
|
||||
Debug(1, "Assigning");
|
||||
|
@ -2365,7 +2365,7 @@ bool Monitor::Analyse() {
|
|||
)
|
||||
) {
|
||||
Debug(1, "Blending from vchannel");
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[3], 0);
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[2], 0);
|
||||
ref_image.Blend(v_image, ( state==ALARM ? alarm_ref_blend_perc : ref_blend_perc ));
|
||||
} else if (snap->image) {
|
||||
Debug(1, "Blending because %p and format %d != %d, %d", snap->in_frame,
|
||||
|
|
Loading…
Reference in New Issue