From 4001ff6714bbdacbb47ed9564cf3b8254c8b7356 Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Fri, 28 Sep 2012 15:04:12 +0200 Subject: [PATCH] show sync pulse at its position, in red. smaller debug image. --- debug.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debug.c b/debug.c index 4dc3f1b..ea07e71 100644 --- a/debug.c +++ b/debug.c @@ -138,7 +138,7 @@ int main(int argc, char **argv) int missing_sync = 0; int seperator_correction = 0; - const int width = (0.150 + 3.0 * sync_porch_len) * drate + 20; + const int width = (0.150 + sync_porch_len) * drate + 24; const int height = 256; struct img *img = 0; @@ -331,10 +331,10 @@ int main(int argc, char **argv) // we always sync if sync pulse is where it should be. if (hor_sync && (hor_ticks >= (int)((hor_len - sync_porch_len) * drate) && hor_ticks < (int)((hor_len + sync_porch_len) * drate))) { - uint8_t *p = img->pixel + 3 * y * width + 3 * hor_ticks + 6 * (int)(sync_porch_len * drate); - p[0] = 0; - p[1] = 255; - p[2] = 255; + uint8_t *p = img->pixel + 3 * y * width + 3 * hor_ticks; + p[0] = 255; + p[1] = 0; + p[2] = 0; y++; if (y == height) { close_img(img);