mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 22:16:22 +00:00
combdetect: switch to zebra striping
This commit is contained in:
parent
cac6b94922
commit
f1993545cf
1 changed files with 5 additions and 2 deletions
|
@ -218,6 +218,7 @@ static GstFlowReturn
|
||||||
gst_comb_detect_transform_frame (GstVideoFilter * filter,
|
gst_comb_detect_transform_frame (GstVideoFilter * filter,
|
||||||
GstVideoFrame * inframe, GstVideoFrame * outframe)
|
GstVideoFrame * inframe, GstVideoFrame * outframe)
|
||||||
{
|
{
|
||||||
|
static int z;
|
||||||
int k;
|
int k;
|
||||||
int height;
|
int height;
|
||||||
int width;
|
int width;
|
||||||
|
@ -225,6 +226,8 @@ gst_comb_detect_transform_frame (GstVideoFilter * filter,
|
||||||
#define GET_LINE(frame,comp,line) (((unsigned char *)(frame)->data[k]) + \
|
#define GET_LINE(frame,comp,line) (((unsigned char *)(frame)->data[k]) + \
|
||||||
(line) * GST_VIDEO_FRAME_COMP_STRIDE((frame), (comp)))
|
(line) * GST_VIDEO_FRAME_COMP_STRIDE((frame), (comp)))
|
||||||
|
|
||||||
|
z++;
|
||||||
|
|
||||||
for (k = 1; k < 3; k++) {
|
for (k = 1; k < 3; k++) {
|
||||||
int i;
|
int i;
|
||||||
height = GST_VIDEO_FRAME_COMP_HEIGHT (outframe, k);
|
height = GST_VIDEO_FRAME_COMP_HEIGHT (outframe, k);
|
||||||
|
@ -273,10 +276,10 @@ gst_comb_detect_transform_frame (GstVideoFilter * filter,
|
||||||
thisline[i] = 0;
|
thisline[i] = 0;
|
||||||
}
|
}
|
||||||
if (thisline[i] > 100) {
|
if (thisline[i] > 100) {
|
||||||
dest[i] = 255;
|
dest[i] = ((i + j + z) & 0x4) ? 235 : 16;
|
||||||
score++;
|
score++;
|
||||||
} else {
|
} else {
|
||||||
dest[i] = src2[i] / 2;
|
dest[i] = src2[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue