]> git.sesse.net Git - bmusb/blobdiff - bmusb.cpp
Build and install a shared library.
[bmusb] / bmusb.cpp
index 5fda2177cd33ee19e0630bdff3a049ab42f8c43e..86779b438357e719f88567b848ef7586e948eb32 100644 (file)
--- a/bmusb.cpp
+++ b/bmusb.cpp
@@ -1,4 +1,4 @@
-// Intensity Shuttle USB3 capture driver, v0.5
+// Intensity Shuttle USB3 capture driver, v0.5.1
 // Can download 8-bit and 10-bit UYVY/v210 frames from HDMI, quite stable
 // (can do captures for hours at a time with no drops), except during startup
 // 576p60/720p60/1080i60 works, 1080p60 does not work (firmware limitation)
@@ -536,6 +536,10 @@ const uint8_t *add_to_frame_fastpath(FrameAllocator::Frame *current_frame, const
 
 #else  // defined(HAS_MULTIVERSIONING)
 
+__attribute__((target("sse4.1")))
+const uint8_t *add_to_frame_fastpath_core(FrameAllocator::Frame *current_frame, const uint8_t *aligned_start, const uint8_t *limit, const char sync_char);
+
+__attribute__((target("avx2")))
 const uint8_t *add_to_frame_fastpath_core(FrameAllocator::Frame *current_frame, const uint8_t *aligned_start, const uint8_t *limit, const char sync_char);
 
 // Does a memcpy and memchr in one to reduce processing time.
@@ -1105,6 +1109,11 @@ void BMUSBCapture::configure_card()
        rc = libusb_set_interface_alt_setting(devh, /*interface=*/0, /*alternate_setting=*/1);
        if (rc < 0) {
                fprintf(stderr, "Error setting alternate 1: %s\n", libusb_error_name(rc));
+               if (rc == LIBUSB_ERROR_NOT_FOUND) {
+                       fprintf(stderr, "This is usually because the card came up in USB2 mode.\n");
+                       fprintf(stderr, "In particular, this tends to happen if you boot up with the\n");
+                       fprintf(stderr, "card plugged in; just unplug and replug it, and it usually works.\n");
+               }
                exit(1);
        }
        rc = libusb_set_interface_alt_setting(devh, /*interface=*/0, /*alternate_setting=*/2);