A small patch for the ps-analyzer utility in ivtv-utils-1.3.0.  Add a
display of the scr/scr_ext fields combined and converted into
nanoseconds.  It's easier on my brain than looking at 90 kHz and 27 MHz
clock cycle counts.


--- ivtv-utils-1.3.0/test/ps-analyzer.cpp	2008-08-19 16:06:31.000000000 -0400
+++ ivtv-utils-1.3.0/test/ps-analyzer.cpp	2008-09-28 19:59:13.000000000 -0400
@@ -106,6 +106,11 @@
 	printf("<36 lines ");
 }
 
+u64 scr2ns(u64 scr, unsigned scr_ext)
+{
+	return (300*scr + scr_ext)*1000/27;
+}
+
 static void pack_header(int fh, u64 pos)
 {
 	unsigned char hdr[10];
@@ -130,7 +135,7 @@
 	mux_rate |= hdr[7] << 7;
 	mux_rate |= (hdr[8] & 0xfe) >> 1;
 	if (g_verbose)
-		printf("%lld: pack scr=%lld scr_ext=%u mux_rate=%u\n", pos, scr, scr_ext, mux_rate);
+		printf("%lld: pack scr=%lld scr_ext=%3u scr=%lld ns mux_rate=%u\n", pos, scr, scr_ext, scr2ns(scr, scr_ext), mux_rate);
 
 	marker = psread_u32(fh);
 	if (marker != 0x000001bb) {
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

Reply via email to