]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Automatically loop genlock video file.
authorToni Wilen <twilen@winuae.net>
Sun, 27 Oct 2019 12:02:31 +0000 (14:02 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 27 Oct 2019 12:02:31 +0000 (14:02 +0200)
od-win32/win32_videograb.cpp
specialmonitors.cpp

index 6aa7fe553e1dca747d05a8ae1a1ad8d93ffb2b2b..f2f8bdcda278a1cdff14d6ca777aafc3f68e4452 100644 (file)
@@ -442,5 +442,8 @@ void isvideograb_status(void)
                        break;
                mediaEvent->FreeEventParams(EventCode, lParam1, lParam2);
                write_log(_T("VIDEOGRAB EVENT %08X %08X %08X\n"), EventCode, lParam1, lParam2);
+               if (EventCode == EC_COMPLETE) {
+                       getsetpositionvideograb(0);
+               }
        }
 }
index 90ceca9e9916694d5b2c884d65e9313e5ee8dc73..f8fb2cb4b38422d3866a0249dac370f7adffd379 100755 (executable)
@@ -2591,6 +2591,7 @@ skip:
                        continue;
 
                uae_u8 *line = src->bufmem + yoff * src->rowbytes;
+               uae_u8 *lineprev = yoff > 0 ? src->bufmem + (yoff - 1) * src->rowbytes : NULL;
                uae_u8 *dstline = dst->bufmem + ((y * 2 + oddlines) - dst->yoffset) * dst->rowbytes;
                uae_u8 *line_genlock = row_map_genlock[yoff];
                int gy = ((y * 2 + oddlines) - src->yoffset - offsety) * deltay / 65536;
@@ -2600,13 +2601,12 @@ skip:
                r = g = b;
                a = amix1;
                noise_add = (quickrand() & 15) | 1;
+               uae_u8 *s = line;
+               uae_u8 *d = dstline;
+               uae_u8 *s_genlock = line_genlock;
                for (x = 0; x < src->inwidth; x++) {
-                       uae_u8 *s = line + x * src->pixbytes;
-                       uae_u8 *d = dstline + x * dst->pixbytes;
-                       uae_u8 *s_genlock = line_genlock + x;
                        uae_u8 *s2 = s + src->rowbytes;
                        uae_u8 *d2 = d + dst->rowbytes;
-
                        if (is_transparent(*s_genlock)) {
                                a = amix2;
                                if (genlock_error) {
@@ -2637,6 +2637,9 @@ skip:
                        } else {
                                PUT_AMIGARGBA(d, s, d2, s2, dst, 0, doublelines, false);
                        }
+                       s += src->pixbytes;
+                       d += dst->pixbytes;
+                       s_genlock++;
                }
        }