-// Intensity Shuttle USB3 capture driver, v0.5
+// Intensity Shuttle USB3 capture driver, v0.5.2
// 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)
#include <algorithm>
#include <atomic>
+#include <chrono>
#include <condition_variable>
#include <cstddef>
#include <cstdint>
#include <thread>
using namespace std;
+using namespace std::chrono;
using namespace std::placeholders;
#define USB_VENDOR_BLACKMAGIC 0x1edb
uint16_t timecode = (start[1] << 8) | start[0];
if (current_video_frame.len > 0) {
+ current_video_frame.received_timestamp = steady_clock::now();
+
// If format is 0x0800 (no signal), add a fake (empty) audio
// frame to get it out of the queue.
// TODO: Figure out if there are other formats that come with
uint16_t format = (start[3] << 8) | start[2];
uint16_t timecode = (start[1] << 8) | start[0];
if (current_audio_frame.len > 0) {
+ current_audio_frame.received_timestamp = steady_clock::now();
//dump_audio_block();
queue_frame(format, timecode, current_audio_frame, &pending_audio_frames);
}
#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.